Free Support Forum - aspose.com

Loading JPG caused StackOverflowException

The attached JPG is causing a StackOverflowException in Aspose.Imaging .NET 21.3 when loading:

var img = Aspose.Imaging.Image.Load("input.jpg");

input.jpg (233.6 KB)

Can you please look into this, as StackOverflowException cannot be caught.

Thanks

@ast3

I have created a ticket with ID IMAGINGNET-4441 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

@ast3

Using Aspose.Imaging for .NET 21.4, I am unable to reproduce the issue. Can you please try using following code.

public static void LoadJpg()
{
    string basePath = @"/Users/mudassirkhan/Downloads";
    string inputFilePath = Path.Combine(basePath, "input.jpg");
    using (Image image = Image.Load(inputFilePath))
    {
        image.Save(inputFilePath + ".png", new PngOptions());
    }
} 

input.jpg.jpg (261.2 KB)

Hi Mudassir,

The JPG linked to your last reply is different to the JPG that causes the StackOverflowException. Perhaps the upload process modified the original uploaded JPG?

To hopefully prevent this, here is the JPG zipped: input.zip (238.1 KB)

I am still getting the StackOverflowException error when trying to load the attached JPG file with v 21.4

@ast3

I have reproduced the issue with new JPG shared by you and have created a ticket with ID IMAGINGNET-4464 to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.