Free Support Forum - aspose.com

AccessViolationException on Windows Server 2003 x64/ new Document(stream)

Hi,

I'm using Apose.Words inside a sharepoint event handler to modify word documents programatically, that were added to a document library.

Everything works fine on my Windows 2004 32bit staging server, but when I deploy the dll to the x64 production system, I receive a AccessViolationExceptioen in the call to:

Document doc = new Document(stream);

System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
at ᒋ.ᑪ.ᖧ(BinaryReader ൈ)
at ᑇ.ᑢ.ᄉ(Stream ك, String ء)
at ᑇ.ᑆ..ctor(Stream stream, String password, Document doc)
at Aspose.Words.Document.࠾(Stream ك, LoadFormat ࠿, String ء)
at Aspose.Words.Document..ctor(Stream stream)
at DocEditEventHandler.UpdateDocument(Stream inStream, Stream outStream, String docNo, String version, DateTime checkinDate, String fileName)

Any ideas how to fix this? Probably an incompatibilty issue with Aspose.Words.Net and W2K3 x64?

Thanks and Regards,

Tobias


Hi

Please try using Aspose.Words 5.0.0. I think that this could help you.
http://www.aspose.com/Community/Files/51/aspose.words/entry112260.aspx

Best regards.

Hi Alexey,

thank you. That solved the issue.

Best regards,

Tobias

I am running into the same problem:

We were using aspose.PDF + aspose.word on our local dev computers and everything worked fine (windows 2k3 server 32bit) We then deployed to our test server Windows 2k3 64bit and the site blew up.

Description:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at ..(BinaryReader )

at ..ᄉ(Stream ك, String ء)

at ...ctor(Stream stream, String password, Document doc)

at Aspose.Words.Document.࠾(Stream ك, LoadFormat ࠿, String ء)

at Aspose.Words.Document..ctor(Stream stream)

Our site is running .net 2.0, and the version of Aspose.word version 5.0.2.0 and Aspose.pdf version 3.6.2.0. Any help would be helpful.

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. This is known issue. You can try using Aspose.Words 5.0.0. This version should works fine on x64 OS.

Best regards.

Hi!

I'm experiencing the same problem. The code that's using the Aspose.Words assembly (version 5.0.2) is running inside a Microsoft SharePoint eventhandler on Win2k3 x64.

One intersting thing I've discovered is that everything works fine if I attach a debugger to the w3wp process remotely from my 32-bit XP development machine. I don't set any breakpoints or anything, just attaching it makes everyhing work.

Even after detaching the debugger, everything continues to work. But if I reset the application pool and try again without attaching the debugger first, I get the AccessViolationException and the w3wp process dies.

Does the 5.0.0 version work better on x64 than 5.0.2? I'm downloading 5.0.0 now and I'll give it a shot....

Hi

Some builds we released before fail to work on Windows Server 2003 64bit, we suspect due to obfuscation. 5.0.2 has this problem. 5.0.0 should be used instead if you need it Windows Server 2003 64bit.

Best regards.

Just to follow up on my own comment, I tried the 5.0.0 assembly and it works swimmingly! :slight_smile: