Unable to convert file with dashed lines

Hi,
I’ve used the example code to transform a Visio file to a PNG file using the latest Aspose.Diagram for Java library (17.9.0), however, when it’s parsing the file, I get an exception when it tries to draw the lines between blocks.
Changing the line style from dashed to solid allows generation of a PNG, but this looks more like a bug to me.
Is anyone able to assist?

Stacktrace below for reference:
Exception in thread “main” java.lang.InternalError: Unable to Stroke shape (setDashT4: invalid dash transformation (singular))
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:285)
at sun.java2d.pipe.LoopPipe.draw(LoopPipe.java:201)
at sun.java2d.pipe.PixelToParallelogramConverter.draw(PixelToParallelogramConverter.java:148)
at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:154)
at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2497)
at com.aspose.diagram.a.d.bl.b(Unknown Source)
at com.aspose.diagram.a.d.m.a(Unknown Source)
at com.aspose.diagram.a.d.e.a(Unknown Source)
at com.aspose.diagram.a.d.d.a(Unknown Source)
at com.aspose.diagram.a.d.e.a(Unknown Source)
at com.aspose.diagram.a.d.d.a(Unknown Source)
at com.aspose.diagram.a.d.e.a(Unknown Source)
at com.aspose.diagram.a.d.d.a(Unknown Source)
at com.aspose.diagram.a.d.e.a(Unknown Source)
at com.aspose.diagram.a.d.l.a(Unknown Source)
at com.aspose.diagram.a.d.bl.a(Unknown Source)
at com.aspose.diagram.a.d.bl.a(Unknown Source)
at com.aspose.diagram.a.d.bl.a(Unknown Source)
at com.aspose.diagram.oi.a(Unknown Source)
at com.aspose.diagram.oi.a(Unknown Source)
at com.aspose.diagram.Diagram.a(Unknown Source)
at com.aspose.diagram.Diagram.save(Unknown Source)
at
at
Caused by: sun.dc.pr.PRError: setDashT4: invalid dash transformation (singular)
at sun.dc.pr.PathDasher.setDashT4(Native Method)
at sun.dc.DuctusRenderingEngine.strokeTo(DuctusRenderingEngine.java:151)
at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:278)
… 23 more

@rchjt,

Kindly send us all details of the use case including source Visio drawing and code. We will investigate and share our findings with you.

Hi @imran.rafique,
Thanks for the prompt response. Please see the attached ZIP. In this is a ‘good’ diagram composed of only solid connectors, which generates the expected image, and a ‘bad’ diagram which has 2 connectors which have a line style (first dash in the menu), which throws the exceptions. I’ve attached console output for both.

aspose.zip (67.0 KB)

@rchjt,

We have converted your problematic Visio drawing with the latest version 18.2 of Aspose.Diagram for Java API and it works fine without the error. This is the output PNG: Output.png (3.2 KB). Please download and try the latest version 18.2 of Aspose.Diagram for Java API, and then let us know how that goes into your environment.

Hi,
Thanks - it looks to work with 18.2. By the way - the link you’ve given (to Maven) gives a 404.

@rchjt,

Thank you for the confirmation. The above Maven link is properly navigating to the download page. Snapshot: https://i.imgur.com/GyOVHgL.png