facebookincubator / FBX2glTF

A command-line tool for the conversion of 3D model assets on the FBX file format to the glTF file format.
Other
2.1k stars 332 forks source link

FBX2glTF crashed because of some kind of FBXs #242

Open shrinktofit opened 5 years ago

shrinktofit commented 5 years ago

The crashes happened at https://github.com/facebookincubator/FBX2glTF/blob/37f992321eeb2d593f86371a1fe39c26a0e8467c/src/fbx/materials/FbxMaterials.cpp#L90 and https://github.com/facebookincubator/FBX2glTF/blob/37f992321eeb2d593f86371a1fe39c26a0e8467c/src/fbx/materials/FbxMaterials.cpp#L102

In both cases, summaries are empty. I tracked into constructor, it suggested that in https://github.com/facebookincubator/FBX2glTF/blob/37f992321eeb2d593f86371a1fe39c26a0e8467c/src/fbx/materials/FbxMaterials.cpp#L42 indices->GetCount() equals to 0, which leads to empty summaries.

I don't know the ultimate cause. I solve it by test if summaries is empty in my fork commit. If it helps, I can request PR.


Here is an example file causing crash. F_hts_Boss@bossattackB.zip