#108 Crash/Hanging when importing attached empty Collada file

Release 3.0
Assimp lib (91)

(Please delete ID: 3597169, accidentally submitted too early)

When importing the attached Collada file, Assimp crashs or hangs sometimes - not always.
Only reproducible in Release builds.
Code to reproduce:

Assimp::Importer importer;

importer.SetPropertyInteger(AI_CONFIG_IMPORT_TER_MAKE_UVS, 1);
importer.SetPropertyFloat(AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE, 80.f);
importer.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, 0 );
importer.SetPropertyInteger(AI_CONFIG_PP_SLM_VERTEX_LIMIT, 0xFFFF);

unsigned int ppsteps =
aiProcess_CalcTangentSpace | // calculate tangents and bitangents if possible
aiProcess_JoinIdenticalVertices | // join identical vertices/ optimize indexing
aiProcess_ValidateDataStructure | // perform a full validation of the loader's output
aiProcess_ImproveCacheLocality | // improve the cache locality of the output vertices
aiProcess_RemoveRedundantMaterials | // remove redundant materials
aiProcess_FindDegenerates | // remove degenerated polygons from the import
aiProcess_FindInvalidData | // detect invalid model data, such as invalid normal vectors
aiProcess_GenUVCoords | // convert spherical, cylindrical, box and planar mapping to proper UVs
aiProcess_TransformUVCoords | // preprocess UV transformations (scaling, translation ...)
aiProcess_FindInstances | // search for instanced meshes and remove them by references to one master
aiProcess_LimitBoneWeights | // limit bone weights to 4 per vertex
aiProcess_OptimizeMeshes | // join small meshes, if possible;
aiProcess_OptimizeGraph | // Nodes with no animations, bones, lights or cameras assigned are collapsed and joined.
aiProcess_GenSmoothNormals | // generate smooth normal vectors if not existing
aiProcess_SplitLargeMeshes | // split large, unrenderable meshes into submeshes
aiProcess_Triangulate | // triangulate polygons with more than 3 edges
aiProcess_MakeLeftHanded | // convert everything to D3D left handed space
aiProcess_SortByPType | // make 'clean' meshes which consist of a single typ of primitives

const aiScene *scene = importer.ReadFile(filename, ppsteps);

Symptom 1:
- It only occurs sometimes, not all the time.
- Crash seems to be in Assimp code in destructor
delete [] mIndices;
- delete [] returns but destructor doesn't

Symptom 2:
Assimp viewer also crashs when loading the attached file.


  • Thomas Ziegenhagen

    • status: open --> pending
  • Thomas Ziegenhagen

    Could not reproduce the Symptom 1 crash, for me it worked every time. But you said it only appears irregularily, I'll keep an eye on it.

    Symptom 2: the file you attached loads fine, no crash in both the library and the viewer.

  • Anonymous - 2012-12-20

    Very strange... I nearly became desperate now because first, I also couldn't reproduce it.

    But then, I tried multiple times with AssimpView.exe - File version from 10.07.2012 (Assimp3). And finally, it loaded forever and it also crashed sometimes with the attached Collada file.
    It seems to me that this is more likely with the x64 version but also occurs with x86... Very strange. Especially because it doesn't occur at all at the moment with the old Assimp Viewer from 21.11.2010 (Assimp 2) where it occured yesterday all the time.

    Maybe it's some random memory content and currently, I have cleaner memory than yesterday? ;-)

  • Anonymous - 2012-12-20
    • status: pending --> open
  • Thomas Ziegenhagen

    Maybe :-) I've tested it a few times with x64 Assimp, current revision from repository. I never encountered anything strange. But seemingly random crashes like this could also be caused by sloppy parallel programming. I've checked the loading part of AssimpView, but haven't found anything that looks problematic.

    The only we could do is to keep an eye on it.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks