[ODE] Randomly, ODE goes haywire

Shamyl Zakariya shamyl at zakariya.net
Mon Jan 24 17:47:01 MST 2005


All,

I've been writing a simple game as a side project, and it's been 
working out well. However, now and then ( maybe one time in ten or 
fifteen ) when loading or reloading a level, the joints in the player 
vehicle ( a dune buggy type thing ) go wobbly and the buggy falls 
through the trimesh ground. When I say "wobbly" I mean it's like the 
buggy's made of Jello.

When this happens, ODE continually spits out the message:

	ODE Message 3: LCP internal error, s <= 0 (s=nan)

The game doesn't crash, it just goes haywire. Sometimes the buggy just 
falls downwards, through the ground trimesh and through a groundplane 
at z=0; other times the buggy bounces back up and flies into the sky.

If I exit the level, and reload it, it's generally *fine*.

This is interesting because it's unpredictable. Most of the time it 
doesn't happen. Sometimes it does. When it does happen, it's *always* 
right when the level is loaded, not during gameplay.

I can't find any circumstance that leads the situation. If the sim were 
always unstable I'd understand, but this is a situation where the sim 
is 100% stable 99% of the time, and the one percent of the time it 
isn't stable, it's *completely* bogus.

When I first discovered the trouble, I was maintaining one world, space 
and contact group for the duration of the game app lifetime -- e.g. 
created when the game starts and destroyed when the app exits. I 
switched it to destroy the world, space and contact group ( and call 
dCloseODE() ) and make new ones when a level is loaded, but that didn't 
help.

Does anybody have any ideas?

Shamyl Zakariya
   "this is, after all, one of those movies where people spend a great
   deal of time looking at things and pointing."
	From a review of _Fantastic Voyage_
  
                           



More information about the ODE mailing list