[ODE] Empty bodies crash with trimesh

Jeff Kershner jeff at jeffkershner.com
Mon Aug 28 15:36:35 MST 2006


My scene has a room (box) and a sphere.  The box is created with a trimesh
and the sphere is just a sphere geom.

For some reason, when my sphere hits the ground of the box, dCollide crashes
in my NearCallback function.  

dBodyID b1 is valid
dBodyID b2 is NULL (probably the ground that doesn't have a body attached to
it)

The geoms for b1 and b2 look like valid pointers.

What am I doing wrong?


-----Original Message-----
From: Remi Ricard [mailto:remi.ricard at simlog.com] 
Sent: Monday, August 28, 2006 1:23 PM
To: Jeff Kershner; ODE Mailing List (E-mail)
Subject: Re: [ODE] Empty bodies crash with trimesh

Hi Jeff,


> My physics geometry for a non-moveable test world is a single node in 
> OSG with 4 "geometries." I create these 4 geometries as trimeshes and 
> do not associate bodies with them.
>
> The problem is that in the NearCallback function, dBodyID b1 and 
> dBodyID b2 are both NULL and dCollide crashes.
>
> I think this has to do with a wall intersecting a floor and both don't 
> have bBodyIDs.
>
> Do I need to check for b1 and b2 both being null and exit that 
> collision callback function?
>

Yes and no.

If you set your collide and category bits correctly you should not go to 
this function (with a wall and a florr) since there are not movable and 
should not collide.

But You should always check if they are both null you never know.


Remi





More information about the ODE mailing list