Aspose Memory leak exception in .Net Project

Hi Team,

We are using ASPOSE to read the PDF documents. We are currently using Aspose.PDF Version 18.9.0.0. We have around 60000 pdf files which needs to read and process it. After reading 12000 pdf files, we are seeing StackOverFlow exception. looks like the object is not getting disposed.

I tried in different ways, but i am still seeing same error.

1 Like

@akommareddy

Thank you for contacting support.

Would you please elaborate it a little more if this can be reproduced with less number of files. Please share a narrowed down code snippet based on any of the approach you have tested with, so that we may try to reproduce and investigate it further.

Hi Raza,
Let me share the piece of code, where I am seeing exception. After reading the PDF documents from fileshare for 12000, we are seeing stack overflow exception on following code “pdfDocument.Pages.Accept(textAbsorber);”. We have around 50000 PDF documents in fileshare and may increase or decrease the files count.

public string ExtractData(string path)
    {
        string result;
            using (Document pdfDocument = new Document(path))
            {
                TextAbsorber textAbsorber = new TextAbsorber();
                pdfDocument.Pages.Accept(textAbsorber);
                // Get the extracted text
                result = textAbsorber.Text;
            }

        return result;
    }

@akommareddy

Thank you for elaborating it.

We have logged a ticket with ID PDFNET-45507 in our issue management system for further investigations. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.