|
From: Chris B. <chr...@gm...> - 2006-04-10 16:50:30
|
On 10/04/06, Chris Bainbridge <chr...@gm...> wrote:
> On 10/04/06, Hart's Antler <bha...@ya...> wrote:
> > python bails hard when i do j.setAxis( (0,0,1) ) with a SliderJoint? U=
sing pyode 1.1 and
> > python2.4 on win32. can anyone confirm the code below crashes?
Incidentally, the crash is in dJointSetSliderAxis () from
/usr/lib/python2.4/site-packages/ode.so
The ode source for this function:
extern "C" void dJointSetSliderAxis (dxJointSlider *joint,
dReal x, dReal y, dReal z)
{
int i;
dUASSERT(joint,"bad joint argument");
dUASSERT(joint->vtable =3D=3D &__dslider_vtable,"joint is not a slider");
setAxes (joint,x,y,z,joint->axis1,0);
// compute initial relative rotation body1 -> body2, or env -> body1
// also compute center of body1 w.r.t body 2
if (joint->node[1].body) {
<cut>
}
else {
// set joint->qrel to the transpose of the first body's q
joint->qrel[0] =3D joint->node[0].body->q[0];
so if the bodies aren't set, either of those body references are going
to cause a lookup of a random or null address, depending on how the
pointer is initialised.
You might like to report the bug to the ODE project. There should at
least be an assert checking that the bodies are set.
|