Repository navigation
Fix double free when the mesh contains duplicate bones. - #4944
dmarcinkovic wants to merge 1 commit into
Conversation
|
Noticed this bug with FBX files which have bones with duplicate names. |
|
I am not able to update your branch. Could you do this, please? That would help a lot. |
|
I see that the problem exists and that we need a solution for that. Unfortunately, this solution will only work for c++. The stuff gets inlined only when we are using a c++ compiler. |
|
Why are there duplicate bones in the first place? Can we just define that bones must be unique and fix any loaders that create duplicates? |
|
I will update the branch and I'll try to provide a solution that will work with the other compilers as well. |
|
@turol, I got a double free or corruption error when I tried to import an fbx created with the Autodesk Maya tool. |
|
Can you share a failing model? |
d06051f to
da1f4e8
Compare
|
Unfortunately, the model I used is proprietary. |
|
Will get merged by #5291 |
The aiMesh class destructor iterates the array of bones and deletes them.
In the case of duplicate bones, the same bone is attempted to be deleted twice which causes the 'double free or corruption error.
We can store bones in the set and delete each bone only once.