Error Reading Memory

Hi Guys,

We use Aspose.Words to generate documents ( version 3.5.1.0 ).

All the tests we made internally worked correctly on any version of word we tested ( Office 2000 / XP / 2003 ) but when the documents are sent to outside contacts most of them have issues to open them ( Word crashed with invalid memory read at address ... ).

Have you encountered this problem yet ? Is there anything I can provide you with that could help you to find out why it is behaving this way ?

No, we haven’t heard of such kind of problems before. Please provide something that can help us to reproduce the error. Files, error screenshot, client configuration info - anything will be helpful.

Ok. I attached to this reply a Zip file containing a generated document.

When opened internally, no issues at all but for many of our customers, Word open with message "The Memory Could Not Be Read" and crashes ( customer version of Word can be either 2000, XP or 2003 )

I've reproduced the error opening attached document in Word 2000.

The problem is logged to our defect base as Issue #905. We will be able to deal with it in the next 2-3 weeks.

Excellent news.

Thanks

Could you please also send us the original document. (The one you use as a template for generating output documents.) We need it to diagnose the problem properly.

Sure.Here is the template.

I'm working on this issue and I need your help.

How do you populate fields «ConfigTable», «_SITEEndCustomerSignature_», «_LANGOfferConditions_» and all remaining fields at the end of the document with terms and conditions? Could you zip your code and attach here?

Basically, I need to have a code that creates a document that crashes MS Word. Then I will be "halving" (e.g. removing parts of the code) and checking if the produced document still crashes MS Word so I will narrow the problem down to a single element. It could be a list or table or style or whatever. Then I will be able to look at it in details and fix.

At the moment when I just open the template document and save in Aspose.Words, the produced document does not crash MS Word 2000. So the elements that crash MS Word must be created during the process of inserting data into the document.

Ok, the issue is resolved.

In one of the tables, namele in the «ConfigTable» you have a row where a first cell is specified as merged to previous cell. Apparently MS Word 2000 does not like that and crashes, whereas MS Word 2003 recovers from this.

You need to fix this in your code that generates the table (you probably build it using DocumentBuilder). You need to set CellFormat.HorizontalMerge = CellMerge.None for the first cell in each row of a table.

We are also going to add this "automatic fix" to Aspose.Words so it does not let you produce first cells merged to previous.

I'll check that, make some tests and tell you the results.

Thanks for you support

I finally managed to find an old Office 2000 CD ...

You were right, I was missing a CellMerge.First attribute... I can now open my documents with Word 2000

My concen is that when I tested a document generated by my software on Win 2000 ( before I made the change ), the error was not a crash of the software but a popup window telling me that a table was corrupted and some lines were removed ...

When you tested my original document, did you experience a "real" crash of Word ( like it happen for some of our customers ) or just the same popup window ?

When I narrowed down on the problem and tested with several cells, with some text or without I got all sorts of behaviour from MS Word 2000. It was sometimes crashing “memory cannot be read”, sometimes giving “table is corrupt” and sometimes just hanging. That all is gone when the table is produced properly.

Ok, so everything should be fine now.

Thanks for your support.