Errors in some btAssert expressions

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
RolandSt
Posts: 1
Joined: Tue May 08, 2012 10:16 am

Errors in some btAssert expressions

Post by RolandSt »

Hello,

there are some incorrect assert expressions (wrong boolean logic) inside some Demos.

E.G. FractureDemo.cpp(275):
btAssert((!m_shootBoxShape || m_shootBoxShape->getShapeType() != INVALID_SHAPE_PROXYTYPE));
should be
btAssert((m_shootBoxShape && m_shootBoxShape->getShapeType() != INVALID_SHAPE_PROXYTYPE));

There is a similar expression in btRigidBody* DemoApplication::localCreateRigidBody:
btAssert((!shape || shape->getShapeType() != INVALID_SHAPE_PROXYTYPE));
should be
btAssert((shape && shape->getShapeType() != INVALID_SHAPE_PROXYTYPE));

...and other places.

You can show the error by setting the pointer to 0 (e.g. shape=0). The assertion won't come up.

BTW: What is the best way to report errors? I start using Bullet for a project.

Beside this error: I really appreciate Bullet Physics! Thanks to Erwin Coumans and all other contributers!

rolandSt
Post Reply