I've build Bullet from the latest source on GitHub and added the resulting .lib files (x64 release /MD) to another project. Everything compiles and seems to work fine, except for one very specific thing: deleting a pointer to a btBoxShape. I have literally the following code in my project (nothing else in between those two lines):
Code: Select all
btBoxShape* bs = new btBoxShape(btVector3(1, 1, 1));
delete bs;
When debugging, Visual Studio pops up an exception message on the second line: "Test.exe has triggered a breakpoint." When I replace btBoxShape by btSphereShape or btStaticPlaneShape, deleting works fine and creating a rigid body with the btBoxShape and running a simulation with it also works fine. Only deleting the btBoxShape seems to a problem.
I can't reproduce the problem by running this code in the HelloWorld sample in the Bullet project itself, so obviously it has something to do with my other project, but I have no idea where to even start looking for a possible cause. Any ideas would be greatly appreciated!