Menu

#403 U3D export crashes the IDTFConverter

v1.0_(example)
open
nobody
1
2014-06-17
2014-06-17
No

I used Meshlab to convert a 3DS file to U3D.
Default export options did not produce any file.

So I exported to IDTF and try the IDTFConverter.exe manually. The converter crashes, but Meshlab does not show any message. I think it could at least verify if the output file has been generated and bring up some error message.

So I downloaded the U3D source package and built it myself with Visual Studio Express and run it under the debugger to see where the converter crashes.
Turned out that the IDTF file is malformed. The parser isn't very robust and does not print any error message, but the debug version fires an assertion (array index out of bounds).

I assumed this is related to an incorrect section in the IDTF file generated by Meshlab:
MESH_FACE_SHADING_LIST {
4294967295
4294967295
4294967295
4294967295
4294967295
...
Those numbers are interpreted as -1, which is an invalid index to some internal shaders array, and that causes the crash. The parser cannot recover from that error.

Then I tried to uncheck the option "TexCoord (Wedge)" in the Mesh export dialog and this time it worked.
So I checked the intermediate IDTF file to see the difference:
MESH_FACE_SHADING_LIST {
0
0
0
0
...

I think that either the export dialog or the export plugin should be fixed.
Moreover the options checked by default in the export dialog do not include "Face colors", which is far more useful.

Attached the source 3DS file I used for this test.

Best regards,
Paolo

2 Attachments

Discussion


Log in to post a comment.

MongoDB Logo MongoDB