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

Free Support Forum - aspose.com

Aspose.Words critical memory leak in 22.4

I will try to expose the problem in as much detail as possible as it costed us a lot until we identify it.

We upgraded our Aspose libraries to version 21.10 some time ago.
We released that version and a problem was identified with word documents.

Error was “w16sdtdh is an undeclared prefix…”

We researched and found out this is a known issue and we updated to version 22.4. We tested it and everything seemed fine

When we pushed to production however we broke our web server. Aspose.Words is used from our WebServer application to Merge documents and return to clients the results.
The web application is hosted under IIS.
Problem consists in requests getting stuck and never time out and never finish and hogging CPU in some endless background aspose threads.
This leads to pretty quick utilization of the whole server and crashing of the virtual machine just because it gets unbearable and cannot process anything.

There was some memory leak or some process getting STUCK and never stopping.
We tried to debug and analyze and what we found was related to Aspose.Words library and particulary the MailMerge feature.
We since then reverted back to 21.10 and that resolved the problem with the server CPU crashing but we are back to square one with the word document.

We also are not sure if only specific documents caused this CPU STUCK because our server is utilized by a lot of users and different documents that are getting merged. and we couldnt recreate it in test which leads me to believe its document specific.

Do you guys know about specific issue and may be if you know if you resolved something like that recently? Its very risky for us to upgrade again because its a Production trial/error at the moment if we can apply it or not.

We cannot afford trial/errors since we have huge customer base and strict requirements.
Any info about this problem and any help to resolve it will be greatly appreciated

Thank you

@DanielPetrov It is difficult to say what the problem is without an ability to reproduce the it. I also suspect this is a document specific problem. Since 22.4 version there were several fixes with Aspose.Words hanging on some specific documents.
If it is possible it would be great if you provide the document that causes the problem on your side. This will help us to understand what causes the problem and check whether the problem still persists in the latest 22.7 version of Aspose.Words.

Hi Alexey

Yes, unfortunately we were UNABLE to identify in production environment which exactly document caused it. We are working on implementing enhanced logging to try and capture such scenario.
The challenge is that the request never finishes and never actually errors, its just stuck
so we need custom logic to store record when we BEGIN something
then if it doesnt finish we can analyze and find such records in db to identify what started but havent ended.

That makes the issue complicated because we cannot afford experimenting with new versions on prod just to validate and we dont know if and when this can happen again.

@DanielPetrov Thank you for additional information. Unfortunately, as I mentioned, it is impossible to analyze the problem without ability to reproduce it. It is difficult to guess what can cause the problem on your side without the problematic document.
Also there were at least 5 fixed issues with hanging made after 22.4 version, so probably your problematic document will also work correct with the latest Aspose.Words version, but still the document is required for testing to make sure.


can you send me some more details about the 5 fixed issues so I can see if something is matching the problem we were observing ?
Any release notes or if you have the descriptions of the 5 things you mentioned would help a lot?

@DanielPetrov Sure, I grouped the issue by versions.

WORDSNET-23678 - Aspose.Words hangs upon rendering document.
WORDSNET-23225 - /freeze in paragraph rules/ Aspose.Words hangs on document rendering.
WORDSNET-23919 - /footnote/ Aspose.Words hangs upon updating fields or layout.
WORDSNET-23781 - /footnote/ wk: updatePageLayout hangs
WORDSNET-23968 - /footnote/ Hanging during export to Pdf
WORDSNET-23866 - /footnote/ Field updating hangs if document is optimized for Word2016.
WORDSNET-23888 - Aspose.Words hangs for a while upon loading MHTML file.

Full release notes are available here: