We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

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

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.

.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.


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)

    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) ?


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.

File attached! OverflowException.zip (1.2 MB)


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.

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