Free Support Forum - aspose.com

UpdateFields throws NullReferenceException for document that has SmartArt in ASP.NET

Null reference from just loading and calling UpdateFields with the supplied document. App is an ASP.net MVC site and code is called from a background thread.

var ms = new MemoryStream(System.IO.File.ReadAllBytes(@"c:\temp\test.docx"));
var doc = new Aspose.Words.Document(ms);
doc.UpdateFields();

'doc.UpdateFields()' threw an exception of type 'System.NullReferenceException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2147467261
HelpLink: null
InnerException: null
Message: "Object reference not set to an instance of an object."
Source: "Aspose.Words"
StackTrace: " at \u0006 .\u0005 \u0002(\u0003 \u0002)\r\n at \u0005 .\u0002(ShapeBase \u0002)\r\n at \u000f .\u0002(ShapeBase \u0002, \u000e \u0003)\r\n at \u000f .\u0002(\u000e \u0002, Boolean \u0003)\r\n at \b .\u0005(\b \u0002)\r\n at \b .\u0002(\u0003 \u0002)\r\n at \u0005 .\u0005 \u0003 ()\r\n at \u0005 .\u0002()\r\n at \b .\u0005 \u0005()\r\n at \u0003 .\u0003 \u0003 ()\r\n at \u0003 .\u0006 \u000f ()\r\n at \u0005​ .\u0002()\r\n at \b .\u0002(\u0003​ \u0002)\r\n at \u0006 .\u0002(\u0003​ \u0002)\r\n at \u0006 .\u0002(\u0003​ \u0002, Int32 \u0003)\r\n at \u000e .\u0002(\u0006 \u0002, Int32 \u0003, Boolean \u0005)\r\n at \u000f .\u0005()\r\n at \u000f .\u0002(\u000f \u0002, Int32 \u0003, Boolean \u0005, Boolean \b)\r\n at \u0005 .\u0005 ()\r\n at \u0005 .\u0002(\u0003 \u0002, Int32 \u0003)\r\n at \u0002 .\u0002(\u0003 \u0002)\r\n at \u0002 .\u0002()\r\n at \u0002 .\u0002(\u000f
\u0002)\r\n at \u000f .\u0002(Boolean \u0002)\r\n at \u0005 .\u0002(Boolean \u0002)\r\n at \u0003 .\u0002 ()\r\n at \u0002 .\u0002(Document \u0002, \b \u0003)\r\n at \u0006 .\u0006 \u0002()\r\n at \b .\u0003(\u0006 \u0002)\r\n at \u000f​ .\u0002(\u0006 \u0002, \u0006 \u0003)\r\n at \u000f​ .\u0002(Node \u0002, \u000f​ \u0003)\r\n at Aspose.Words.Document.UpdateFields()"
TargetSite: { ( )}


I could not reproduce with just this code in a console app so it might be to do with the app model. Looks to be related to the SmartArt from the stack trace.
16.10.0 does not produce this error but I need 16.11.0 for the rendering updates.

Hi there,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14534. 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-14534) have been fixed in this Aspose.Words for .NET 16.12.0 update and this Aspose.Words for Java 16.12.0 update.


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

The issues you have found earlier (filed as WORDSNET-14544) have been fixed in this Aspose.Words for .NET 17.1.0 update and this Aspose.Words for Java 17.1.0 update.


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