Hmm, it's not a bug in that sense as ODE is actually correctly deleting the geoms when you destroy the space. However, it does highlight a problem that's been overlooked.
The problem arises because in JV-ODE, the geoms each have their own contact information attached (used to retrieve the detailed collision data). When you use the dGeomDestroy() function, this data is cleaned up and destroyed also.
But, when using the dSpaceDestroy() function, although ODE correctly destroys all geom instances, it doesn't cleanup and destroy the data that was attached to the old geoms (it isn't aware of the data internally). When you re-init the space and create new geoms, the old geom data still exists, so when you try to process the contacts using dSpaceCollide() it throws a MAV.
For the time being you will need to delete all geoms manually with dGeomDestroy() to correctly destroy the geom data and prevent the MAVs.
I agree this definitely needs looking at, I'll see if I can add the geom data cleanup code to the dSpaceDestroy() process. All should work as expected then.
Thanks for the detailed bug report Danny, I'll look into this right away ;)
The problem arises because in JV-ODE, the geoms each have their own contact information attached (used to retrieve the detailed collision data). When you use the dGeomDestroy() function, this data is cleaned up and destroyed also.
But, when using the dSpaceDestroy() function, although ODE correctly destroys all geom instances, it doesn't cleanup and destroy the data that was attached to the old geoms (it isn't aware of the data internally). When you re-init the space and create new geoms, the old geom data still exists, so when you try to process the contacts using dSpaceCollide() it throws a MAV.
For the time being you will need to delete all geoms manually with dGeomDestroy() to correctly destroy the geom data and prevent the MAVs.
I agree this definitely needs looking at, I'll see if I can add the geom data cleanup code to the dSpaceDestroy() process. All should work as expected then.
Thanks for the detailed bug report Danny, I'll look into this right away ;)