How to use OdeGeom.destroy()?

Hi everyone,

today i encountered a strange error with ode (or maybe i am just missing something)

So what i am basically doing is creating one odegeom and after that i call odegeom.destroy(). But as it seems the odegeom still exists because i can still print and get back the object.

So the next thing is that i create another odegeom and when i then start my gametask my program crashes when autocollide() gets called and i get an bnormalization error under windows and, more strange, an pygame segmentation fault under linux.

After some time i found out that AFTER i destroyed the odegeom i can call odegeom.disable() on it and the program doesnt crash anymore.

That lets me guess that the odegeom-object i called destroy()upon still exists in the ode space and so my other odegeom-object collides with it which leads to the bnormalization error.

Any ideas on that? Really seems like a bug for me that needs to get fixed. Also i should mention that the same seems to apply for odebody.

Greetz Blaz

Could you post some example code to the bug tracker for this?


geom.destroy()#will not remove it

#i use
for i in range(MySpace.getNumGeoms()):
    if g==geom:
        g.destroy()#does work

Thanks, but iterating over the odespace wouldnt work because i dont want do destroy every geom-object. My code looks like that at the moment:

self._collision_model = OdeBoxGeom(self._ode_space, 3,3,2)
...some things i do...
#collision model still exists

Greetz Blaz