When loading .glb/.gltf/.obj file using "Triangulate" option: Fatal error. Internal CLR error. (0x80131506)

Issue #94 new
Jesper Sporron created an issue

I am running latest master (commit hash `0e82d0d472ae891b371807e6f2d8d8bb97f5fd3e`). When attempting to load any of the attached files using the Triangulate option I get an internal CLR error:

Fatal error. Internal CLR error. (0x80131506)

For gltf files they still crash without the Triangulate option. glb and obj files seem fine without the triangulate option (other than the fact that they are not triangulated; of course ;) )

Perhaps related but loading a single 200kb glb file uses almost 2gb of ram before it crashes!

Cause seems to be this function in Scene.cs

This is because nativeValue.Name is something like 39 gigabytes in size! I can’t even debug it properly because my IDE runs out of memory lol!

Comments (5)

  1. Nicholas Woodfield repo owner

    Can you give some details on what .net framework you’re running on this? Debug/Release? 32bit? 64bit?

    I gave your models a try in the AssimpNet sample (64bit, .net core) and they all loaded fine with and without PostProcessSteps.Triangulate. For AiString.GetString to do what you describe, it sounds like there’s an alignment issue with the native scene ptr (e.g. length being something astronomical).

  2. Log in to comment