[ODE] Crash in dBodyDestroy

Devrim Erdem devrim.erdem at gmail.com
Mon Oct 18 18:09:57 MST 2004


Using ode 0.5 on Windows

I am experiencing crashes originating from the dBodyDestroy function.
This function is triggered by the destructor of the dBody class of the
C++ API.

The following code block is taken from the dBodyDestory function.

for (dxGeom *geom = b->geom; geom; geom = next_geom) {
    next_geom = dGeomGetBodyNext (geom);
    dGeomSetBody (geom,0);
  }

The crash happens in the dGeomGetBodyNext (geom) function, the "geom"
provided from dBodyDestroy to the dGeomGetBodyNext  function has the
value of 0xdddddddd ( which indicates released heap memory on visual
c++ ) .

I would classify this problem as an ODE bug but I would appreciate if
anybody could give me a hint about what could be triggering such a
crash so that I could work around the problem until a cleaner solution
is found.

Devrim Erdem


More information about the ODE mailing list