[ODE] Re: Framework for reproducing bugs

nlin@nlin.net nlin at nlin.net
Mon Nov 5 12:32:02 MST 2001


Shaul Kedem wrote:
> Russ: can such a feature be platform independant? can
> someone record on win32 with PIII and then replay on
> SGI machine?

I'm not Russ, but I'll try to answer anyway :-)  Basically due to
minor floating-point differences between processors (even if all are
IEEE compliant), no, this is in general not possible. There's a good
article on this sort of thing at Gamasutra; do a search
on "reproducible game behavior".

What we (I?) could do is to write an ODE proxy wrapper class with a
switch "logging" or "no logging." So instead of calling dStepWorld
in your code, you would call ODEProxy->dStepWorld, which would then
either directly forward the call to dStepWorld, or which would first
log the call, then call dStepWorld.

Such a proxy class could be developed entirely separately from ODE, since
it is just a logging proxy to the real ODE interface.

One issue is the ID values which are returned from the various functions.
These are, as far as I know, essentially pointer values, so they would
not be the same from run-to-run. So, to record a run, you would have to
keep an stl::map mapping the internal ODE ID's back to anonymous, sequential
ID's. Then, when playing back the recorded stream, you would have to fetch
the (new) ID's from the stl::map instead of using the (old) ID's recorded
at the time of the recording. Hope that makes sense.

As Russ said, apparent problems with ODE may often come from inappropriate
force feedback (in cybernetic fashion, if you like) from the user's program
back into ODE, thus leading to instability due to the user's unstable
control loop, not due to inherent instability in ODE. Nonetheless, I still
think that a logging framework would still be useful to help determine the
causes of any apparent instability (user-related or ODE-related) and to
enable debugging by multiple developers (assuming the developers all have
access to the same platform and ODE version).

-Norman



More information about the ODE mailing list