[ODE] Gimpact crash during collision test

Lode Vanacken lode.vanacken at uhasselt.be
Thu Mar 8 01:28:03 MST 2007

When having added my objects to ODE and calling dspacecollide I get a 
crash in the following function:

> void gim_aabbset_calc_global_bound(GIM_AABB_SET * aabbset)
> {
>     aabb3f * paabb = aabbset->m_boxes;
>     aabb3f * globalbox = &aabbset->m_global_bound;
>     AABB_COPY((*globalbox),(*paabb));
>     GUINT count = aabbset->m_count-1;
>     paabb++;
>     while(count)
>     {
>         MERGEBOXES(*globalbox,*paabb)
>         paabb++;
>         count--;
>     }
> }

In which the MERGEBOXES macro seems to create the crash. When looking at 
the variable values,
I discovered something weird. aabbset->m_count seems to be 0 thus when 
doing -1 and casting to an
unsigned int we get a very big value.
I'm not sure, but this might create the crash?

Am I doing something wrong? Might it be that m_count never can be 0?


PS: If there exists a gimpact mailing list maybe this message should be 
forwarded there?

More information about the ODE mailing list