[FIXED] Bug: btCompoundShape with enableDynamicAabbTree

Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

[FIXED] Bug: btCompoundShape with enableDynamicAabbTree

Post by Antodologo »

Hi

I am using BtCompoundShape with addChildShape and removeChildShape (Bullet 2.76)

The bug happens when I remove a shape from the compound shape that is not the last one. If I remove the last one or if I remove all the shapes (in any order) I have found no bugs (but they can exist :P). The result is always a crash at btCompoundLeafCallback::ProcessChildShape.

This only happens if enableDynamicAabbTree = true. If dynamic AABB tree is disabled the bug never happens.

If you want to try it yourselves just (2 lines of code :P):
  • Use the ConvexDecompositionDemo
  • Look for the new btCompoundShape(false) and change false for true (Note with false bug will never happen)
  • After the the for loop where all the shapes are added to the compound shape (compound->addChildShape) call "compound->removeChildShapeByIndex(0);"
  • Play with compound objects and use right mouse button to throw cubes and generate collisions until you find the right collision point (should be really easy I promise)
Ask me if you need more info ;)

Greetings
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Bug: btCompoundShape with enableDynamicAabbTree

Post by Erwin Coumans »

Can you try out Bullet 2.77?

This might have fixed it:
http://code.google.com/p/bullet/source/ ... p&old=2050

Thanks,
Erwin
Antodologo
Posts: 21
Joined: Sat Feb 06, 2010 3:40 am

Re: Bug: btCompoundShape with enableDynamicAabbTree

Post by Antodologo »

Yes. It seems fixed with that change.

Thank you ;)