[ODE] RE: memory trashing bug in dcTriListCollider.cpp?

Erwin de Vries erwin at vo.com
Tue Jun 18 12:30:02 2002


Yea that probably works. Make sure to use Flags & 0xffff for future
compatibility.

Erwin

----- Original Message -----
From: "David McClurg" <dmcclurg@pandemicstudios.com.au>
To: <ode@q12.org>
Sent: Tuesday, June 18, 2002 01:45
Subject: RE: [ODE] RE: memory trashing bug in dcTriListCollider.cpp?


> 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));
> >
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>