We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

"Attempted to read or write protected memory" exception while converting to PDF on Windows Server 2008

Hi,


I’m getting an exception (see below) when trying to convert Word documents (doc, docx) to PDF on Windows Server 2008 64bit machines (works fine on Windows 2003 32bit machines). I’ve attached some sample documents.

I’m using the latest versions of Aspose, ie:
- Aspose.Words 9.0.0.0
- Aspose.Pdf 4.2.1.0
- Aspose.Pdf.Kit 4.3.0.0

The code I’m using to convert is the following:

Aspose.Words.Document document = …
document.Save(stream, Aspose.Words.SaveFormat.AsposePdf);

Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.BindXML(stream, null);

The funny thing is that if I have Visual Studio attached to the W3WP process while doing the conversion, no exception is thrown.

Any ideas?

Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack: at x3f91538e8c0de749.x7576dadd7c449efa.xeb1273bf491e08c1(Pdf x5510939d5b9dcd91, XmlTextReader xe134235b3526fa75) at x3f91538e8c0de749.x4c849e0e778e539e.xff87749e7f0b2b9f(xaa36f84dba9d652f xaa03fa4cc68dfe5a, XmlTextReader xe134235b3526fa75) at x3f91538e8c0de749.xaa36f84dba9d652f.x2681d93a2b0484a6(XmlTextReader x97bf2eeabd4abc7b) at x3f91538e8c0de749.xaa36f84dba9d652f.xf5c83e8e96d416b7(XmlDocument x5510939d5b9dcd91, XslTransform x3cf26ef95f0d3133) at Aspose.Pdf.Pdf.BindXML(Stream xmlStream, Stream xslStream)

Hi,

Sorry for replying you late. We are looking into the details of this problem and will get back to you, shortly.

We apologize for your inconvenience.

Hi,


Any news?

Hi,

I have tested the scenario in details using Aspose.Pdf for .NET 4.2.1 and Aspose.Words for .NET 9.0.0 in Windows Server 2008 64 Bit SP1 over Intel Core 2 Duo 2.33 GHZ machine and I am unable to notice any problem. The source word files are being converted into PDF format without any issue.

I have also tried the Direct-to-PDF save method of Aspose.Words and the conversion is being performed without any problem. Can you please share some more details regarding your working environment i.e. .NET Framework version etc.

The resultant PDF's that I have generated with both methods, are in attachment. Please take a look.

We apologize for your inconvenience.

Hi,


Sorry for the delay in answering.

Our environment is Windows Server 2008 Standard SP2 running on a VMWare virtual machine with 1CPU 2.5GHz.

I can send you the memory dump file at the moment of the crash if you wish. Eventually we could find a way for you guys to log on to the machine for debugging.

Hi,

Please share the memory dump, may be it can help us to resolve your problem.

We are sorry for your inconvenience.

Hi,


I have attached the memory dump (7zip - divided in 6 chunks - remove the zip extension of each file) as well as the console application I used.


Hi,


Any news on this?

We had a similar problem with Aspose.Network and they’ve fixed it: http://www.aspose.com/community/forums/235331/exception-when-creating-a-mapimessage-object-on-windows-server-2008-64-bit-environment/showthread.aspx#235331

Maybe Aspose.Pdf has a similar problem?

Hi,

Sorry for getting back to you so late.

We are still looking into the details of this problem and will update you with the appropriate status, shortly. Please accept our apologies for the delay and inconvenience.

Hi,

Thanks for your patience.

I have again tested the scenario in details over Windows Server 2008 R2 Standard edition where my system is Intel Core 2 CPU 2.40 Ghz with 1.0 GB of RAM containing .NET Framework 2.0 and Visual Studio 2005 and I am unable to notice the problem while using Aspose.Pdf for .NET 4.4.0 and Aspose.Words 9.1.0. The word documents that you have shared in your original post are properly being converted into PDF format.

Aspose.Pdf for .NET 4.4.0 will become available under download section over LiveServer, shortly. Can you please try using the above specified versions of the products and in case you still face any problem or you have any further query, please feel free to contact.

We apologize for your inconvenience.

Hi,


The new DLLs solved the problem.

Thanks for the help.