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

Free Support Forum - aspose.com

Aspose.PDF DLL Throwing Exception and Stops Working At All (REALLY URGENT)

Dear Sir/Madam;

We are using Aspose.PDF for mainly three types of operations, merging pdf files, simple manupulation of text inside pdfs and text extraction.

Today we have faced a horrible problem in one of our live installations; for some reason Aspose.PDF started raising exceptions such as:

[EXCEPTION ] --> Object reference not set to an instance of an object.
[STACK TRACE] --> at .Š.€(Stream )
at .Š.€(String , Assembly )

(attached is a screenshot - since non printable characters (due to obfuscation) are not visible here)

We have been facing a similar issue with Aspose.PDF while saving a word doc as pdf before and asked for your help on this. For some input files, this problem (if same) is reproducable; and you can see the details in issue #461818.

However, the big problem is with Aspose.PDF; when this error starts showing up all actions performed using Aspose.PDF throws the same exception. It looks like something static inside the Aspose.PDF gets broken and the problem gets persistent. No actions can be performed until the whole process is killed and restarted. Please note that this is a web application with hundreds of users and killing the process means the system gets down for all of them.

Such a problem is causing our system being unfunctional for a couple of hours, and hundreds of users get effected. The client is really really upset about this problem, and we have to find a solution right away.

Below are some facts about the problem, which we hope can help you figure out what is wrong.

1. This issue does not happen all the time; in fact it happenned for the first time in last 3-4 weeks.
2. When the exception starts showing up, Aspose.PDF dll is totally unusable (throws same exception for every action such as merge files, extract text, manipulate text etc.), until the process (w3wp) is restarted.
3. The issue is 90% related to something static inside Aspose.PDF
4. We have no idea about how to reproduce this (and hope it will not happen again in live environment, otherwise the client will kill us)
5. We have no idea about what triggerred this problem
6. Killing the w3wp process fixed the problem; however this is a terrible solution for large scale enterprise systems.
7. We absolutely do not cache any object related to Aspose.PDF; for each action it is created, license set and used.

Today, our system has been non-functional for about 3 hours due to this issue. As a company, we are really in a though situation now since client asks for an explanation as well as a solid situation.

We either need to figure out what causes this so that we can avoid it. Maybe you can provide possible reasons. We also need a solution; even a way to "refresh" the Aspose.PDF static stuff so that system functions properly without totally taking it down.

We do need your assistance on this urgently. If purchasing a ticket will speed up the process, we will do that. If we have to pay any support fee, we will do that. Just tell us what you need to ensure that this problem never comes up again; please do not say "be patient". This has been the worst problem we have faced so far.

Hoping to hear from you very soon.

Thanks in advance.

Hi Alp,

Sorry for the inconvenience faced. Its very difficult to investigate an issue without replicating it. Can you please share some more information about your environment settings and Aspose.Pdf version? As you mentioned it was working fine, did you make any changes to your environment, software upgrade or new installation? Can you investigate from your server/application logs that what triggered this failure?

Please investigate/confirm above things for further investigation.

Best Regards,


I know this is a though situation; but there is no way to replicate it since it happenned only once for maybe 2 months. I have no clue about what triggerred it.

The version is 7.7 (we did not upgrade to 7.8 due to some other issues in that version - reported seperately here).

About the logs, there are no entries in event viewer. Only log we do have is the one I shared with you; containing the obfuscated signatures.

About the changes to our system and/or updates, there were none. That is what scares us; since we are sure that the problem comes from the PDF dll itself; and we have no way to handle it.

Can you please consider the static stuff inside the DLL, which might cause a persistent issue such as this? Also, is there any way to "reset" or "reinitialize" the DLL programmatically if we get into this situation again?

Hi Alp,

Thanks for your feedback. I’ve created an investigation ticket as PDFNEWNET-35298 in our issue tracking system for further investigation and shared your provided information with development team. I’ll update you via this forum thread as soon as I get a feedback.

Sorry for the inconvenience faced.

Best Regards,

Hi Alp,

We are sorry for the delayed response. As you mentioned the issue happens rarely, can you please confirm whether issue still exists? If issue persist then please share share some code sample and sample files. So our development team will try to reproduce the issue by running your code in multiple threads; if it is some threading/synchronization probably we can reproduce it in that way.

Moreover, we will recommend you to try latest version of Aspose.Pdf for .NET 9.1.0 as we have fixed number of performance and license related issues in previous releases.

Best Regards,