An exception of type 'System.StackOverflowException' that I can not catch it

Hi

In the process phase to convert a pdf page in png and save it to a stream, I have an untreated exception.
you will find below a part of my code

        try
        {
            using (Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document("RNC_étail.PDF"))
            {
                // Render the page into a raster image
                using (MemoryStream imageStream = new MemoryStream())
                {
                    // Create Resolution object
                    Resolution res = new Resolution(300);
                    // Create PNG device with specified attributes
                    PngDevice pngDevice = new PngDevice(res);

                    // Convert a particular page and save the image to stream
                    // The exception occurs here
                    **pngDevice.Process(pdfDocument.Pages[1], imageStream);**  
                }
            }
        }
        catch (StackOverflowException EX)
        {
            Console.WriteLine(EX?.Message);
        }
        catch (Exception EX)
        {
            Console.WriteLine(EX?.Message);
        }

The problem is that I can not catch the exception.

Thank you in advance.

Exception :
System.StackOverflowException
HResult = 0x800703E9
Message = An exception of type ‘System.StackOverflowException’ was thrown.

@MohammedHa

Thanks for contacting support.

Would you please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

Thank you for your reply @asad.ali , I sent you the pdf in private.

@MohammedHa

Thanks for sharing the sample PDF document.

We have tested the scenario in our environment and were able to reproduce the issue which you have mentioned. We have logged it as PDFNET-45539 in our issue tracking system for the sake of further investigation and resolution. We will definitely keep you posted with the status of its rectification. Please spare us little time.

We are sorry for the inconvenience.

@asad.ali

We face the same issue on Production, since the exception cannot be catch, it causes the whole app pool stop!.
Do we know the root cause of this issue, any workaround, or any information can help us temporary prevent the issue from our side while waiting the fix from your side?

Thanks
Dung Nguyen

@tuandunguit

Thanks for contacting support.

I regretfully share that the issue is pending for investigation due to large number of high priority issues in the queue. However would you please share any sample PDF with which the issue is reproducible. We will test the scenario in our environment and share our feedback.

The issues you have found earlier (filed as PDFNET-45539) have been fixed in Aspose.PDF for .NET 19.8.