OgreODE geometry throws exception

Khuran

10-06-2010 13:46:45

I went throught the whole mess of setting up OgreOde, and I tried to run the First Steps tutorial.
It compiles, but before rendering it throws an exception (Access violation in 0x00000004), interrupting at this line:

void addBody(SceneNode* usedsn)
{
OgreOde::Body *mBody;
OgreOde::Geometry *mGeom;

mBody = new OgreOde::Body(mWorld);
usedsn->attachObject(mBody);

Vector3 size(10.0,10.0,10.0);

OgreOde::BoxMass mMass(1,size);
mMass.setDensity(5.0,size);
mGeom = (OgreOde::Geometry*)new OgreOde::BoxGeometry(size, mWorld, mWorld->getDefaultSpace()); // <----- THIS
usedsn->setScale(size.x,size.y,size.z);
mBody->setMass(mMass);
mGeom->setBody(mBody);


The whole initialising process is fine. What could it be?
Thanks

shanefarris

10-06-2010 23:18:51

In the past I can usually fix this by recompiling my dependencies and making sure all my libraries are linked with the latest build.

I don't think that is an ODE issue, but I could be wrong.

Khuran

11-06-2010 19:16:04

I didn't include ogreode_loader and ogreode_prefab libs.
But it still doesn't work. Now the exception is thrown in xmemory.h, line 43:

// allocate storage for _Count elements of type _Ty
return ((_Ty _FARQ *)::operator new(_Count * sizeof (_Ty)));

shanefarris

17-06-2010 03:03:14

Again, doubt its an ogreOde thing, try doing a rebuild of everything.