Bullet Physics has been great. I am getting this crash though. In my game rigid bodies are removed from the btDiscreteDynamicsWorld after they are out of the field of play. They are then recycled and added back into the btDiscreteDynamicsWorld when needed. When they get recycled almost immediately there are no problems, but on occasion if a rigid body is added several seconds after being removed it will cause bullet physics to crash while stepping the simulation. Here is the corresponding backtrace.
arm/libgdx-bullet.so (btDbvtBroadphase::setAabb(btBroadphaseProxy*, btVector3 const&, btVector3 const&, btDispatcher*)+32)
arm/libgdx-bullet.so (btCollisionWorld::updateSingleAabb(btCollisionObject*)+208)
arm/libgdx-bullet.so (btCollisionWorld::updateAabbs()+28)
arm/libgdx-bullet.so (btCollisionWorld::performDiscreteCollisionDetection()+16)
arm/libgdx-bullet.so (btDiscreteDynamicsWorld::internalSingleStepSimulation(float)+104)
arm/libgdx-bullet.so (btDiscreteDynamicsWorld::stepSimulation(float, int, float)+236)
Any thoughts on where I've gone wrong?
Fatal signal 11 (SIGSEGV) at btDbvtBroadphase::setAabb
Re: Fatal signal 11 (SIGSEGV) at btDbvtBroadphase::setAabb
It turns out that in some cases I was adding the rigid body multiple times which was causing the issue.