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();
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: { ( )}
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.