DiagramException: Error in element VisioDocument

With the following code and the attached file:

String path = "/path/to/file.vsd";
Diagram visioDiagram = new Diagram(path);

I get the following stack trace:

com.aspose.diagram.DiagramException: Error in element VisioDocument in \VisioDocument. null

at com.aspose.diagram.hq.a(Unknown Source)
at com.aspose.diagram.bp.load(Unknown Source)
at com.aspose.diagram.ma.a(Unknown Source)
at com.aspose.diagram.ma.a(Unknown Source)
at com.aspose.diagram.Diagram.<init>(Unknown Source)

I am using aspose.diagram for java 19.9 on openjdk 8

If this document is truly corrupted, should a more relevant exception be thrown? If the document is not corrupted, is this a bug in aspose.diagram?

Thanks

@PeteLee

We could not find any attachment with your post. Would you please make sure to attach your source file in ZIP format. We will test the scenario in our environment and address it accordingly.

D9C4101BE2CEEABF920A22986E321D7754B5BBBC.vsd.zip (22.1 KB)

@PeteLee

We faced a different exception while testing the scenario in our environment. i.e.

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
	at com.aspose.diagram.aaw.<init>(Unknown Source)
	at com.aspose.diagram.ael.a(Unknown Source)
	at com.aspose.diagram.ael.<init>(Unknown Source)
	at com.aspose.diagram.adj.<init>(Unknown Source)
	at com.aspose.diagram.wu.a(Unknown Source)
	at com.aspose.diagram.bo.g(Unknown Source)
	at com.aspose.diagram.ga.e(Unknown Source)
	at com.aspose.diagram.bp.load(Unknown Source)
	at com.aspose.diagram.ma.a(Unknown Source)
	at com.aspose.diagram.ma.a(Unknown Source)
	at com.aspose.diagram.Diagram.<init>(Unknown Source)
	at Aspose.Test.VisioToSVG(Test.java:1392)
	at Aspose.Test.Run(Test.java:66)
	at Aspose.Test.main(Test.java:28)

However, we have logged an issue as DIAGRAMJAVA-50668 in our issue tracking system with all the details you have provided. We will further look into details of this scenario and keep you posted with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.

@PeteLee

We further checked the source file and it was found corrupt. However, we have implemented a new Exception which will be thrown while checking streams. Please download Aspose.Diagram for Java 19.9.1 as hotfix and in case you face any other issue, please feel free to let us know.

The issues you have found earlier (filed as DIAGRAMJAVA-50668) have been fixed in Aspose.Diagram for Java 19.10.