Crash in debug and 3X calling of Vehicle::userCallback()

todderod

26-08-2007 20:36:31

First of all I have made an observation while trying to debug my application, and it is that the userCallback() of OgreNewt::Vehicle gets called 3 times for each m_World->update( m_elapsed ); there is in the supplied OgreNewt_BasicFramelistener. Is it supposed to be this way, or am I doing something horribly wrong in my setup?


I also have a problem that is causing me MUCH grief. I would be eternally gratefull if someone could tell me what could cause it :D Basicly I have a car just like walaber does in Stunt Playground by inhereting OgreNewt::Vehicle. I have a car selection screen, where the car is created a little bit up in the air and then dropped into the showroom for display. When I run a debugbuild, the car is instantly teleported to the floor, where it will remain for about ~10 seconds where the program crashes, due to the car in about 5-6 last updates have flewn away far far far out of any reasonable bounds causing assert's within Ogre to trigger.

in my logs this looks like this:

19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.30972e-005
19:16:44: Car Omega: 0.130938
19:16:44: Car Omega: 2.6186e-005
19:16:44: Car Omega: 0.130925
19:16:44: Newton updates this loop: 2
19:16:44: car pos: 0 0 0
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.30972e-005
19:16:44: Newton updates this loop: 1
19:16:44: car pos: -64 -32 0
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.30972e-005
19:16:44: Newton updates this loop: 1
19:16:44: car pos: -160 -128 0
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.30972e-005
19:16:44: Newton updates this loop: 1
19:16:44: car pos: -672 -576 0
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.30972e-005
19:16:44: Newton updates this loop: 1
19:16:44: car pos: -1056 -70944 -192
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130951
19:16:44: Car Omega: 1.31056e-005
19:16:44: Newton updates this loop: 1
19:16:44: car pos: -3.43521e+012 -2.80176e+012 9.80379e+009
19:16:44: Car Omega: 0
19:16:44: Car Omega: 0.130959
19:16:44: Car Omega: -1.#IND
19:16:44: Newton updates this loop: 1
19:16:44: car pos: 1.#QNAN 1.#QNAN 1.#QNAN



In Release builds everything works perfectly fine, car is dropped and falling as it should and there are also no crashes. I can drive it around as it should in the next "scene" after the car selection/shoowroom.

This last crash/behaviour in debug is confusing me alot.