[ODE] More news on the crash problem

Flavien Brebion f.brebion at vrcontext.com
Thu Aug 28 05:18:02 2003


As i mentionned in a previous mail, i'm getting a
crash in ODE when getting stuck into objects.

Last time, i found that the cause of the crash was
the positions becoming not-a-number, and assumed it
was a result of an infinite impulse due to the
collisions. I pursued my investigations..

Here is a typical screenshot from my racing game,
that makes ODE crash:

http://www.fl-tw.com/LightSpeed/screenshot54.jpg

It's a bit hard to tell because the polys are big, but
there's actually a road jump just above the car. So the
car is "under" the road, where the jump starts, and is
colliding both with the road and the ground. It's not
even really stuck, just collides with both. The road
and the ground are tri-meshes; the car is an OBB.

In blue you can see the collision points and normals.
The normals are inversed but that's actually correct.
What's more interesting is, highlighted in pink, two
contact points that look really weird. They extend up
to infinity.

So i logged into a file the contact points values, and
got this (directly taken from MSVC6's workspace):

Contact 0: Pos = 723.080 1.142 97.354 Normal = -0.503 0.701 0.505 Depth =
0.000
Contact 1: Pos = 723.771 1.142 98.044 Normal = -0.503 0.701 0.505 Depth =
0.000
Contact 2: Pos = 722.937 1.137 97.712 Normal = -0.011 1.000 0.011 Depth =
0.271
Contact 3: Pos = 723.760 1.386 98.032 Normal = -0.706 -0.000 0.708 Depth =
0.003
Contact 4: Pos = 723.616 1.391 97.889 Normal = -0.706 -0.000 0.708 Depth =
0.000
Contact 5: Pos = 723.084 1.397 97.358 Normal = -0.706 0.000 0.708 Depth =
0.011
Contact 0: Pos = 723.616 1.391 97.889 Normal = 1.#QO 1.#QO 1.#QO Depth =
0.000
Contact 1: Pos = 723.760 1.386 98.032 Normal = 1.#QO 1.#QO 1.#QO Depth =
0.003
Contact 2: Pos = 724.909 1.265 92.766 Normal = -0.019 1.000 0.019 Depth =
0.274
Contact 3: Pos = 726.871 1.253 95.373 Normal = -0.019 1.000 0.019 Depth =
0.274
Contact 4: Pos = 725.528 1.162 98.741 Normal = -0.019 1.000 0.019 Depth =
0.274
Contact 5: Pos = 723.771 1.142 98.044 Normal = -0.019 1.000 0.019 Depth =
0.000
Contact 6: Pos = 723.080 1.142 97.354 Normal = -0.019 1.000 0.019 Depth =
0.000
Contact 0: Pos = 724.994 0.000 92.480 Normal = 0.000 -1.000 0.000 Depth =
0.181
Contact 1: Pos = 723.287 0.000 96.768 Normal = 0.000 -1.000 0.000 Depth =
0.181
Contact 2: Pos = 724.146 0.000 98.225 Normal = 0.000 -1.000 0.000 Depth =
0.181
Contact 3: Pos = 725.494 0.000 98.761 Normal = 0.000 -1.000 0.000 Depth =
0.181
Contact 4: Pos = 727.584 0.000 93.509 Normal = 0.000 -1.000 0.000 Depth =
0.181

And here.. you can see two contact points with..
guess what? an invalid NaN normal.

I have honnestly no idea how the collision functions can
generate a contact point with invalid normal...?

Does anybody have an idea? I don't want to loose my time
debugging code that isn't even mine.. is it a known bug,
or should i investigate further?

Note that the bug happens "rarely", but since i logged the
exact position, velocities, orientations when this happens,
i'm now able to replicate it 100% of the time with a single
debug key.

Any suggestion is welcome.

F. Brebion