Free Support Forum - aspose.com

Stack Overflow Exception when converting certain web pages to PDF

Hi,
After upgrading to the latest version of Aspose.HTML (21.3.0) I have found that attempting to convert certain HTML files to PDF is causing a stack overflow exception. On further testing this file converted successfully in version 20.11.0 but from 20.12.0 onwards the issue occurs.
Although some other documents fail to convert in version 20.11.0 that do succeed in the latest, we have been forced to downgrade again as those failures are less severe than a stack overflow exception which will crash the entire application. A sample document that can reproduce the issue has been included in the attached ‘Stack Overflow Exception.zip’ archive as both a HTML file (with associated resource directory) and an MHTML file and both versions can reproduce the issue. These were saved using Google Chrome, however the issue can also be reproduced if the page is saved using Microsoft Edge. Is it possible to get this investigated as it is currently a blocker to updating?

Stack Overflow Exception.zip (2.6 MB)

For reference I am using Aspose.HTML for .NET in C#, opening a HTMLDocument from a file on disk and converting with Converter.ConvertHTML(). The web address that the HTML file was saved from is https://www.sarna.net/wiki/Adder_(Puma)

Thanks

@dcdeveloper

We tested the scenario in our environment and faced a different Exception i.e. System.InvalidCastException. We have logged an issue as HTMLNET-3071 in our issue tracking system for further investigation. The details provided by you is also logged along with the ticket so that it can be investigated from that perspective as well. We will further look into details of the logged ticket and let you know once it is resolved. Please be patient and give us some time.

We are sorry for the incovnenience.