StackOverflow error while opening file with Aspose.Words

Hello,

I am currently using the trial version of Aspose for an application I am developing. The application needs to open very large quantities of word documents and run over extended periods of time without crashing. For the most part, Aspose has solved some issues but I have run into a single instance where it caused my program to crash with a stack overflow error, and I cannot resolve it with error-handling. The problem occurs while opening a specific file. I can’t attach the file since it is from a client and may contain confidential information.

Thanks,

Doug

Hi Doug,

I have received your document in email. The issue will be fixed and available in the next release before end of June. You will get an automatic email notification from the forum.

Thank you.

My concern is that the problem may still occur with other files. Is it possible to include in the update a way to catch any possible stack overflow errors so that it does not cause my program to crash?

At least for my application, an error that I can handle is acceptable but anything that causes it to crash is not. Thank you,

Doug

At first, I must say the document is corrupted. It includes two styles that reference each other in a circular fashion. Trying to open this file in MS Word 2007 results in a crash. Most of the time, files that crash MS Word will also crash Aspose.Words. So far so good.

I understand the problem with StackOverflowException in this case. It would be enough if Aspose.Words just threw FileCorruptedException in this case and that's what I first attempted to do.

However, it turns out I cannot just catch and convert StackOverflowException into FileCorruptedException to cater for all possible corrupted documents in the future that cause endless recursion due to one corruption or another.

So I just had to implement a fix for circular references between styles. Now Aspose.Words can read and save this document and it becomes valid.

But I cannot guarantee that StackOverflow will never happen again for other corrupted documents.

I appreciate your response. I’m well aware of the fact that the document I sent is an exception - I have tested hundreds of thousands of documents and this is the only one that caused a StackOverflow error. I look forward to the release that fixes the issue with this particular document and will report any subsequent occurrences.

Regards,

Doug


The issues you have found earlier (filed as 9313) have been fixed in this update.


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