nxOgre crash [noob]

kungfoomasta

04-07-2007 00:32:54

I'm getting a crash at this line:

mNxScene->simulate(mTiming_MaxStep - (mTiming_MaxStep - mTiming_CurrentStep));

CallStack:

> NxOgre.dll!NxOgre::FixedSceneController::Simulate(float deltaTime=0.00000000) Line 153 + 0x6 bytes C++
NxOgre.dll!NxOgre::Scene::simulate(float time=0.00000000) Line 413 + 0x1d bytes C++
NxOgre.dll!NxOgre::World::simulate(float time=0.00000000) Line 142 + 0x2c bytes C++
NxOgre.dll!NxOgre::PhysXDriver::frameStarted(const Ogre::FrameEvent & evt={...}) Line 266 C++


This is the little snippets of code I have, I haven't done anything dramatic..


mNXWorld = new NxOgre::World();
...
mNXScene = new NxOgre::Scene(mName,mSceneManager,LumeriaApplication::getSingleton().getNXWorld());


I'm guessing I'm missing some parts.. but what?

I'm looking at the tutorials to get the basics down, but it's not aligned with the current version I'm using.

Thanks for any help!

KungFooMasta

frier

04-07-2007 03:59:10

i had this problem as well before. i was told to change the code to this.

with all the simulate calls.

I THINK THIS WAS IT!.(i'm at work)

mNxScene->simulate(1.0f/60.0f);

betajaen

04-07-2007 09:28:57

Are you guys using it in release by any chance?

frier

04-07-2007 13:26:19

Nah im using it in debug mode in my game application when i compile it.

And i'm pretty sure i'm using the debug mode dll and lib.

Additional Dependencies = NxOgre_d.lib

EDIT:

p.s. betajaen is there any tutorials on collision with heightmaps?

betajaen

04-07-2007 13:47:40

That's fine. Have you tried '28? It's been released this morning.

frier

04-07-2007 14:00:44

Just downloaded it now.. ill compile it now !

kungfoomasta

04-07-2007 20:53:43

Is there a problem running in release mode? :(

I've been working in release mode forever, would be a pain to convert everything to debug. If you can point me to the root cause maybe I can see if I can spot anything?

betajaen

04-07-2007 21:02:29

Nope. Debug mode automatically sets variables to zeros right, whereas Release does not. I was thinking that I missed something, which causes it to crash in Release. But since I've been working with Debug and Release all day, it seems to be fine.

But since both of you have the same error. Who knows.

kungfoomasta

06-07-2007 12:02:02

I updated to 9-28 I believe, and no crash occurs. So right now I'm able to create a world and scenes with no probs! :D

betajaen

06-07-2007 12:17:21

Good News.

Try a few thousand actors and see if it works:

for (int i=0;i < 2000;i++) {
mScene->createBody("cube.1m.mesh", new CubeShape(0.1f),Vector3(NxMath::rand(-10,10),i,NxMath::rand(-10,10)),"Mass: 1");
}


:D