btGhostObject assertion failed on delete

braindeadbzh
Posts: 6
Joined: Mon Apr 02, 2012 10:22 am

btGhostObject assertion failed on delete

Post by braindeadbzh »

Hi,

I have this error when I try to delete a btGhostObject used for a btKinematicCharacterController:

Code: Select all

bullet-2.79/src/BulletCollision/CollisionDispatch/btGhostObject.cpp:29: virtual btGhostObject::~btGhostObject(): Assertion `!m_overlappingObjects.size()' failed.
Though I remove it from the world with removeCollisionObject before the delete.

I don't understand where is the problem.

Thanks for your help.
braindeadbzh
Posts: 6
Joined: Mon Apr 02, 2012 10:22 am

Re: btGhostObject assertion failed on delete

Post by braindeadbzh »

Nobody has the same problem?
CookieMonster
Posts: 49
Joined: Sun Jan 29, 2012 10:01 pm

Re: btGhostObject assertion failed on delete

Post by CookieMonster »

You must remove the object from the world before deleting it.

Code: Select all

btGhostObject::~btGhostObject()
{
	///btGhostObject should have been removed from the world, so no overlapping objects
	btAssert(!m_overlappingObjects.size());
}