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

Free Support Forum - aspose.com

TypeInitializationException

Hi,

On our prod environment we got TypeInitializationException sometimes on some documents we try to export to msword (on the same documents sometimes we got it and sometimes we don’t).

since you forums system does not support special chars i’ve uploaded the callstack as an image.

Please advise how we can solve this.

Thanks.

I think this is related to something static in your code.

If i reset the process it starts working again.
Hi Omri,

Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

Hi,

As you see from my other bug reports I always try to reproduce bugs in small standalone applications – this time I can’t. It happens from time to time with no pattern I can predict, it happens only when multiple threads are trying to edit documents and it happens on our production server only.

Can you please try to understand the problem based on the call stack I’ve sent you?

Thanks!

Hi Omri,

Thanks for your inquiry.

Unfortunately, it is difficult to say what the problem is without the input document and simplified application. We need your document and simple project to reproduce the problem. As soon as you get these pieces of information to us we'll start our investigation into your issue.

Probably, you are facing this issue due to less memory issue. We suggest you please try latest version of Aspose.Words for .NET 16.11.0 and let us know how it goes on your side. Hope this helps you.

Hi,

This is a major bug and it is unreasonably to ask for a simplified application since this is not a simple case.

The exception is not OutOfMemory but TypeInitializationException – that means that a static constructor is crashing.

I’ll try to reproduce with the new version but I doubt that it will help.

Hi Omri,

Thanks for your inquiry. I am afraid, it is difficult to say what is the problem without sample application and document. Please create a standalone simple console application (source code without compilation errors) that helps us reproduce your problem on our end and attach it here for testing. Thanks for your cooperation.