[ODE] App crashes after destroying joint

Brent Burton brentb at io.com
Mon Jul 28 22:32:02 2003


Hi all,

I've searched the mail archive for ways to properly
destroy a joint, but haven't found anything relevant
to this problem yet.

The short of it is:
A sliding joint is created in it's own group.
The slider models a short steel pin, around which a
ring slides (and can slide off).  Attached to the ring
is an object that moves.

In the application, the model starts, and everything is
moving correctly (drawn with drawstuff).

Prior to each sim step, the position of the ring on the
pin (slider) is checked, to model release:
        if (dJointGetSliderPosition(pin_joint) >= 0.075)
        {
            printf ("Pin released ring\n");
            dJointGroupEmpty (pin_group);
        }

pin_group only contains this one slider joint.

On the next sim step, the application crashes once the above
condition is met and dJointGroupEmpty() is called.

Is there something else I need to do to destroy this joint
properly?  And more importantly, does an action like this
even fit into the ODE worldview?

thanks,
-Brent