ODE Debug behaves differently than ODE release (was Re: [ODE] eliminating all state)

nlin@nlin.net nlin at nlin.net
Fri Nov 22 03:15:02 2002


On Fri, Nov 22, 2002 at 03:02:44PM +0900, Chris Campbell wrote:
> Also, a recording made with the debug binary will not replay
> properly with the release binary and vice versa. 

Recently I have been investigating exactly this determinism problem and have
come to the same conclusion as Chris: ODE's behavior can be deterministically
reproduced with a fixed timestep, but the debug and release versions
act differently.

This is somewhat unsettling for me. I am reasonably certain that is is
ODE itself which is behaving differently in debug and release modes,
not my application. I don't have time to investigate this in detail
now, but I wanted to add a second confirmation to Chris's: ODE debug
behaves differently than ODE release.

One more note which may provide a clue as to the source of the
discrepancy. My app access ODE through custom wrapper classes (in
file1.cpp), and I also declared a custom collision space (in file2.cpp).
If I compile my entire app in debug mode, but compile file1.cpp and file2.cpp
in release mode and link the app with the release ODE lib, then behavior
of the entire debug app is identical with the behavior of the release app.

If I compile file1.cpp in debug mode, OR compile file2.cpp in debug
mode, OR link with the ODE debug library, then divergent behavior
results.

That merely recompiling my *interface* class to ODE causes divergent
behavior seems to indicate this may be a data alignment, calling
convention, or other subtle compiler flag issue.

This is on MSVC 6.

If I recall correctly, I believe that even the ODE demos acted differently
in debug and release modes, so anyone wishing to reproduce this divergent
behavior should be able to do so easily.

-Norman