StackOverFlowException when converting .vsdx to image (.vsd of the same file works) - v18.10


#1

I have a .vsd file that prior to Aspose.Diagram 18.8 would encounter the DIAGRAMNET-51499 issue.This file processes with no issue in 18.10. However, saving that same file as .vsdx now encounters an Overflow error at the same location.

So:
.vsd file works fine where it did not prior to 18.8 (DIAGRAMNET-51499).
That same file saved as .vsdx now fails with a new error “Overflow error”

This is with the latest 18.10 release.

Code:

Diagram diagram = new Diagram(visioFile);
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFileFormat.TIFF)
{
    PixelOffsetMode = PixelOffsetMode.HighQuality,
    SmoothingMode = SmoothingMode.HighQuality,
    CompositingQuality = CompositingQuality.HighQuality,
};

for (int p = 0; p < diagram.Pages.Count; p++)
{
    if (diagram.Pages[p].Background == BOOL.True)
    {
        continue;
    }

    imageSaveOptions.PageIndex = p;

    byte[] imageContent;

    using (MemoryStream imageStream = new MemoryStream())
    {
        diagram.Save(imageStream, imageSaveOptions);   // <-- fails here with Overflow Error

        imageContent = imageStream.GetBuffer();
    }

    // code copying image to Word document
}

Possibly a regression of: Exception at Diagram.save when converting to image (DIAGRAMNET-51368) ?


#2

@netappcole

Thank you for contacting support.

Would you please share the source file with us so that we may try to reproduce and investigate it in our environment.


#3

File attached! OverflowException.zip (1.2 MB)


#4

@netappcole

Thank you for sharing requested data.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID DIAGRAMNET-51578 has been logged in our issue management system for further investigation and resolution. 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.


#5

The issues you have found earlier (filed as DIAGRAMNET-51578) have been fixed in Aspose.Diagram for .NET 18.11.