Visio crashes when opening converted file

After importing vsd file with emf images in it, Visio instantly crashes when opening converted vsdx

vsd file:
bad_emf.zip (135.1 KB)

The file was converted using this part of code:

File file = new File(PATH_TO_VSD_FILE);
Diagram d = new Diagram(file.getAbsolutePath());
d.save(file.getAbsolutePath() + "x", SaveFileFormat.VSDX);

If it helps, the problem is in corrupted image probably, but when saving vsd as vsdx through Visio, everything works fine.

@Denec
Thanks for the template vsd file.
We reproduced the problems you mentioned by converting your template Vsd file to Vsdx.
The emf is wrong in the output file.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s):DIAGRAMJAVA-51187

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as DIAGRAMJAVA-51187) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

Thank you for resolving the crash, but I found out that visio/masters/image1.wmf is corrupted. Is it something with the converter, or the image was initailly corrupted in a vsd file?

@Denec
I’m sorry that this is how the graphic data is in the original VSD file.
We will evaluate this issue further later.
Thanks.