noisy_man
10-04-2008 23:08:49
Hi everyone !
I know, there are a lot of topics about why your program may not work in release mode whereas it works perfectly well in debug mode. Unfortunately, I am in this case and after several hours of reading topics, I'm asking for your help.
Here is the guilty code :
This works perfectly in debug mode, as I said, but crashes systematically in release. No compilation errors and no warnings by the way.
I've verified all the pointers and variables and everything is instantiated, especially those one :
The release project is also linked to the resources (and to ork_rampager.mesh).
Therefore I don't really understand why this createBody() doesn't work. It may be trivial but my brain refuses to give me the answer...
Thanks a lot by advance for your ideas !
I know, there are a lot of topics about why your program may not work in release mode whereas it works perfectly well in debug mode. Unfortunately, I am in this case and after several hours of reading topics, I'm asking for your help.
Here is the guilty code :
NxOgre::ShapeBlueprint* pShape = new NxOgre::CompoundShape(
new NxOgre::CubeShape(20.0f,20.0f,20.0f, "offset: 0 0 0"),
new NxOgre::CubeShape(1.0f,1.0f,1.0f, "offset: 0 0 0") );
// This is were the program crashes : the createBody() call
m_pMovementNode = pPhysicScene->createBody("SpaceShip;ork_rampager.mesh", pShape,
NxOgre::Pose(Ogre::Vector3(600,100,600)), "");
This works perfectly in debug mode, as I said, but crashes systematically in release. No compilation errors and no warnings by the way.
I've verified all the pointers and variables and everything is instantiated, especially those one :
NxOgre::Scene* pPhysicScene; // well instantiated
NxOgre::Body* m_pMovementNode; // set at NULL in the constructor of the class
The release project is also linked to the resources (and to ork_rampager.mesh).
Therefore I don't really understand why this createBody() doesn't work. It may be trivial but my brain refuses to give me the answer...
Thanks a lot by advance for your ideas !