NullReferenceException within UpdatePageLayout on simple document with fields

Hi,

the attached document causes a NullReferenceException to be thrown from a call to Document.UpdatePageLayout() with an exception stack trace that is many levels deep within Aspose.Words.dll. Other calls that also require the page layout to be calculated such as counting pages or construction a LayoutEnumerator also give a NullReferenceException.

This occurs in Aspose.Words 14.10 and earlier versions too.

Run the code below to reproduce the error - hope that it’s possible to fix this.

cheers,

Robin

using System;
using Aspose.Words;
using Aspose.Words.Layout;

namespace Aspose.Bugs
{
class Program
{
static void Main(string[] args)
{
var lic = new License();
lic.SetLicense(“Aspose.lic”);

var doc = new Document(“fields.docx”);
doc.UpdatePageLayout();
}
}
}

Hi Robin,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11095. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-11095) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.