I'm currently converting my project from ODE to bullet. I managed to get everything linked and compiled but suffered a run-time crash at a very early stage and I'm unsure what to do.
Here's a code snipit:
Code: Select all
void CScene::init_physics()
{
m_broadphase = new btDbvtBroadphase();
// Set up the collision configuration and dispatcher
m_collisionConfiguration = new btDefaultCollisionConfiguration();
m_dispatcher = new btCollisionDispatcher(m_collisionConfiguration);
// The actual physics solver
m_solver = new btSequentialImpulseConstraintSolver();
// The world.
m_dynamicsWorld = new btDiscreteDynamicsWorld(m_dispatcher,m_broadphase,m_solver,m_collisionConfiguration);
}
However, I get the following error on trying to construct the btDiscreteDynamicsWorld object:
Unhandled exception at 0x77f2fbae in ClayWorksD.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x0012ead4..
I've tried to fiddle with the bullet project settings so that they're in line with the rest of the project. I've tried dynamic and static linking and I get the same error.
I've put breakpoints in the constructor but it barfs in the new.
Has anybody else had a similar sort of error?
Cheers,
Luther.