System.NullReferenceException when converting a Word document

Hi,

when converting a Word document using Aspose.Words 13.8 (the latest) I get the following stack trace:



Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at x4f4df92b75ba3b67.x438bb4a676d170de.x9059a3203c8fc855 (x5794c252ba25e723.xe39d06eee35dd23d x26094932cf7a9139, System.String xb41faee6912a2313) [0x00000] in :0
at x4f4df92b75ba3b67.x58838bb57cb70d36.x9059a3203c8fc855 (x5794c252ba25e723.xe39d06eee35dd23d x26094932cf7a9139, System.String xb41faee6912a2313) [0x00000] in :0
at x4f4df92b75ba3b67.x79e4013ca0fc082a.xd6b2549ca8b77560 (x1c8faa688b1f0b0c.xcc8c7739d82c63ba x199c511544621683) [0x00000] in :0
at x4f4df92b75ba3b67.xd6b2a42851fedfba.xc7234004e9b72a7e (x1c8faa688b1f0b0c.xcc8c7739d82c63ba x199c511544621683) [0x00000] in :0
at x4f4df92b75ba3b67.x92faf2a956f0f5a7.VisitGlyphs (x1c8faa688b1f0b0c.xcc8c7739d82c63ba glyphs) [0x00000] in :0
at x1c8faa688b1f0b0c.xcc8c7739d82c63ba.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xb8e7e788f6d59708.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xbaec545ec01f92ca.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x1c8faa688b1f0b0c.xc67adcdbca121a26.Accept (x1c8faa688b1f0b0c.xf51865b83a7a0b3b visitor) [0x00000] in :0
at x4f4df92b75ba3b67.x92faf2a956f0f5a7.xe406325e56f74b46 (x1c8faa688b1f0b0c.x4fdf549af9de6b97 xda5bf54deb817e37) [0x00000] in :0
at x6a671772ec29137f.xcd769e39c0788209.DoRenderPage (x1c8faa688b1f0b0c.xc67adcdbca121a26 page) [0x00000] in :0
at xf989f31a236ff98c.x6c74398bceb133f8.xa2e0b7f7da663553 (x28925c9b27b37a46.x8556eed81191af11 x5ac1382edb7bf2c2) [0x00000] in :0
at Aspose.Words.Document.xf381a641001e6830 (System.IO.Stream xcf18e5243f8d5fd3, System.String xafe2f3653ee64ebc, Aspose.Words.Saving.SaveOptions xc27f01f21f67608c) [0x00000] in :0
at Aspose.Words.Document.Save (System.String fileName, Aspose.Words.Saving.SaveOptions saveOptions) [0x00000] in :0
at Aspose.Words.Document.Save (System.String fileName, SaveFormat saveFormat) [0x00000] in :0
at arc2word2pdf.MainClass.Main (System.String[] args) [0x00000] in :0



The program tool is nothing fancy, just calling the conversion like




Document doc = new Document(inputFile);

// remove all comments
NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);
comments.Clear();

// accept all changes from review mode, making the resulting PDF look like it would be
// printed from MS Word
doc.TrackRevisions = false;
doc.AcceptAllRevisions();

doc.Save(outputFile, SaveFormat.Pdf);

Hi Philipp,


Thanks for your inquiry. After an initial test with the latest version of Aspose.Words (13.8.0), I was unable to reproduce this exception on my side. Could you please double check if you’re using Aspose.Words 13.8.0 on your side? You can dynamically check if you’re referencing the correct DLL by using the following code snippet:

System.Reflection.Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
foreach (System.Reflection.Assembly assembly in assemblies)
{
System.Reflection.AssemblyName assemblyName = assembly.GetName();
if (assemblyName.Name.Contains(“Aspose.Words”))
Console.WriteLine("Aspose.Words Version Number: " + assemblyName.Version.ToString());
}

Also, please make sure that you have attached the correct Word document (you’re getting this exception with) with your first post.

Best regards,

Hi,

I double-checked the used Aspose.Words version and it’s 13.8.0.0. I also ensured that I used the file attached here. To make reproduction easier for you, I’m attaching the full program code here as well.

Thanks!

Philipp

Hi Philipp,


Thanks for your inquiry. Unfortunately, I was still unable to reproduce this issue on my side over a 64-bit Windows 7 machine. Could you please try run the attached application on your side and see how it goes? Please also share the environment details (OS, .NET framework versions etc) of the machine you’re getting this problem on.

Best regards,

Hi,

sorry for not including the machine details in the first place! I’m running Aspose.Words in Mono on openSUSE or Debian Linux x86_64 (they produce the same crash).

Details of the openSUSE machine:
$> mono --version
Mono JIT compiler version 2.8.2 (tarball Tue Jul 31 14:40:22 UTC 2012)
Copyright (C) 2002-2010 Novell, Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: debugger softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

Using your unmodified (not recompiled) testcase, I ran it with
$> MONO_IOMAP=all mono Test_495408.exe
and it produces the same stack trace. (MONO_IOMAP is required to get the path to the license right on the Linux machine, it changes no other behavior).

I’ll give it a try with Mono 3 beginning next week, let’s see how that goes.

Thanks!

Philipp

Hi Philipp,


Thanks for the additional information. I will prepare the required platform to simulate the environment as of yours. As soon as everything is setup, I will test your issue on my end and will post the results here for your kind reference. We apologize for any inconvenience.

Best regards,

Hi Philipp,


Thanks for being patient. I tested the scenario on Mono and have managed to reproduce the same exception on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-8990. Our development team will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

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


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