[ODE] RE: memory trashing bug in dcTriListCollider.cpp?
David McClurg
dmcclurg at pandemicstudios.com.au
Mon Jun 17 16:44:02 2002
Perhaps this will do the index checking correctly...
if (Index == OutTriCount){
dIASSERT(OutTriCount < Flags);
dContactGeom* Contact = CONTACT(Contacts, OutTriCount * Stride);
-----Original Message-----
From: Erwin de Vries [mailto:erwin@vo.com]
Sent: Tuesday, 18 June 2002 4:24 AM
To: ode@q12.org
Subject: Re: [ODE] RE: memory trashing bug in dcTriListCollider.cpp?
This is indeed a problem with the current tri-collider. The problem is
finding the N contacts that affect the simulation the most. I didnt bother
with this, and simply assumed an infinite amount.
Erwin
----- Original Message -----
From: "Nate W" <coding@natew.com>
To: <ode@q12.org>
Sent: Monday, June 17, 2002 01:25
Subject: Re: [ODE] RE: memory trashing bug in dcTriListCollider.cpp?
>
> FWIW, I ran into the same thing. I don't remember what value of N I was
> using at first, but I'm now using 50. I didn't investigate any further
> though, so I can't shed any light on what's going on. But, if it makes
> you feel any better, you're not alone. :-)
>
>
> On Mon, 17 Jun 2002, David McClurg wrote:
>
> > When I increased my contact array size from 6 to 20, the crash went
> > away (or moved :p). I'm hoping there is a incorrect/missing test
> > somewhere since I'm passing in the size (N) of the contact array to
> > dCollide().
> >
> > static void NearCallback(void* data, dGeomID o1, dGeomID o2)
> > {
> > const U32 N = 20; // changed from 6 -> 20 and crash went away
> > dContact contacts[N];
> >
> > // get the contacts up to a maximum of N contacts
> > const U32 n = dCollide(o1, o2, N, &contacts[0].geom,
sizeof(dContact));
>