Table.GetHeight(Pdf doc) generates Thread was being aborted exception

Using the Table.GetHeight(Pdf doc) method sometimes generates an error like this:

at
Aspose.Pdf.PdfText.ႌ.۴(ں
ၮ, String ۵, String ۶, Int32 ۷,
Boolean ۸, Boolean ۹, String ۺ,
Boolean ۻ)

at Aspose.Pdf.PdfText.ں.۴(String ۵,
String ۶, Int32 ۷, Boolean ۸,
Boolean ۹, String ۺ, Boolean ۻ)

at Aspose.Pdf.Xml.ဉ.ူ(Pdf
Ә, Text ج, ർ ඪ)

at Aspose.Pdf.Xml.ᙜ.ᙞ(Pdf Ә, Text ج,
Single ٥)

at Aspose.Pdf.Xml.ᙜ.ᙝ(Pdf Ә, Text ج,
Single ٥)

at Aspose.Pdf.Text.GetTextHeight(Pdf doc, Single width)

at Aspose.Pdf.Xml.ᙊ.ᙋ(Pdf ຒ, Paragraph ෱,
Single ٥)

at Aspose.Pdf.Xml.ᚋ.ᚘ(Pdf Ә, Cell ෴)

at Aspose.Pdf.Row.༑(Pdf Ә)

at Aspose.Pdf.Table.GetHeight(Pdf doc)


This doesn’t really say much. This error only happens once in a while in our production environment. The error message is not always exactly the same, but similar. The error usually occurs when the AppPool have been running for a while. When the error occurs it will continue to happen until i recycle or terminate the AppPool. I have not been able to reproduce this on my local machine.

I have attached some of the code that makes the error occur.

The version I am running on this is 4.1.0.0. I am not able to upgrade to 5.0.0.0 until you resolve another issue.

Thanks for you help!


Regards,
Stian

Hello Stian,

Thanks for using our products.

I have tested the scenario while using the attached code snippet over WindowsXP SP3 32Bit in desktop application and I have also tested the same scenario over Windows7 64Bit in Web application and I am unable to notice the problem. I have used Aspose.Pdf for .NET 4.1.0.0 and have tried executing the same code for number times. Can you please share some more details that can help us in replicating this problem at our end.

Meanwhile I have also tested it with Aspose.Pdf for .NET 5.0.0 and I could not reproduce this problem with this version as well.

We apologize for your inconvenience.

I am not able to reproduce it as well, but apparently something inside GetHeight() can cause this exception being thrown.


The example never reaches over one page, since it was just test data. Normally the DataTable is much bigger, and it will produce documents that are from 1 to hundreds of pages. When creating big reports the memory consumption from Aspose PDF can be very high.

We also add images to the rows in some types of reports, I have included a a short snippet that shows how we insert images.

Thank you for your help so far!

Regards,
Stian

Hello again!


I might have found the problem, and it seems it wasn’t related to your software. Our error system didn’t give us the whole information about the exception, when I checked the error on the server I got a clue that it probably was the IIS server that was causing the exception because the page took to long to complete (some reports take a long time to create). So I have increased the executionTimeout property and I haven’t gotten the problem since.

So I am hoping this was the solution, and I am sorry for wasting your time.

Thanks and regards,
Stian

Hello Stian,

Thanks for your continuous interest in our products.

I am glad to hear that your problem is resolved and we are always delighted to assist our customers. In the event you have any further query, please feel free to contact.