ASSERT in btOverlappingPairCache::addOverlappingPair()

Mortlath
Posts: 3
Joined: Wed Apr 18, 2007 9:11 pm

ASSERT in btOverlappingPairCache::addOverlappingPair()

Post by Mortlath »

I think the bug I have is similar to this one:

(look in google cache under terms: assert proxy0 != proxy1)
(the original forum post was lost recently)

I seem to be unable to avoid this bug, as we are creating and deleting many objects, and eventually the pointers are bring reused.

Is there any solution that I can apply?

Thanks.
Mortlath
Posts: 3
Joined: Wed Apr 18, 2007 9:11 pm

Post by Mortlath »

I actually looks like I might be overflowing the number of collision handles. Are handle IDs never regained?

Even if I use BP_USE_FIXEDPOINT_INT_32, it seems like the engine will eventually run out.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

I haven't been able to reproduce this issue yet, although I'm working on it.

If anyone can help a reproduction test in a Bullet demo, that would be highly appreciated.

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

Post by Erwin Coumans »

Are you sure the initial transform is initialized to some value?

btTransform trans;
trans.setIdentity();
//create rigidbody

This was the issue in another case.
When a rigidbody is remove from the world, the handle ID is re-used.

Hope this helps,
Erwin
Mortlath
Posts: 3
Joined: Wed Apr 18, 2007 9:11 pm

Post by Mortlath »

I do initialize the transform:

Code: Select all

	btTransform trans;
	
	trans.setIdentity();
	trans.setOrigin(btVector3(mPosition.x, mPosition.y, mPosition.z));
	trans.setRotation(btQuaternion(mOrientation.x, mOrientation.y, mOrientation.z, mOrientation.w));
Another problem I'm seeing is that the number of manifolds reported by Dispatcher->getNumManifolds(); is much, much higher than the number of overlapping pairs reported by gOverlappingPairs, like 1000 manifolds to only 2 overlapping pairs. This greatly slows down the game, even when only a couple of objects are colliding.

Notes:
-All the objects are spherical or compound sphere shapes
-Here is my initialization code:

Code: Select all

#define maxProxies 32768
	btVector3 worldAabbMin(-10000,-10000,-10000);
	btVector3 worldAabbMax(10000,10000,10000);
	mOverlappingPairCache = new btAxisSweep3(worldAabbMin,worldAabbMax,maxProxies);
	mSolver = new btSequentialImpulseConstraintSolver;
	mDynamicsWorld = new btDiscreteDynamicsWorld(mDispatcher, mOverlappingPairCache, mSolver);
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Some broadphase fixes have been made that could solve the issues you reported.

Can you please upgrade to Bullet 2.51 and see if that helps?
Thanks,
Erwin