<div>Dan</div>
<div> </div>
<div>Looking at the ODE stability issue..      Excessive forces cause an error in int dCollideHeightfield( dxGeom *o1, dxGeom *o2, int flags, dContactGeom* contact, int skip ) in heightfield.cpp in ODE.</div>
<div> </div>
<div>The error occurs on line 1741.</div>
<div> </div>
<div>However..   looking at the code in heightfield.cpp, nMinX nMaxX, nMinZ and nMaxZ are derived from the terrain.   So, next steps on this bug parhaps are to find out if our terrain--> heightfield code has errors, or if there's some kind of error in 
heightfield.cpp that we can simply ignore and continue by returning an int 0, for number of collisions.</div>
<div> </div>
<div>CodeSample from heightfield.cpp;</div>
<div>
<p>    nMinX = int(dFloor(o2->aabb[0] * terrain->m_p_data->m_fInvSampleWidth));<br>    nMaxX = int(dFloor(o2->aabb[1] * terrain->m_p_data->m_fInvSampleWidth)) + 1;<br>    nMinZ = int(dFloor(o2->aabb[4] * terrain->m_p_data->m_fInvSampleDepth));
<br>    nMaxZ = int(dFloor(o2->aabb[5] * terrain->m_p_data->m_fInvSampleDepth)) + 1;</p>
<p>    if ( !wrapped )<br>    {<br>        nMinX = dMAX( nMinX, 0 );<br>        nMaxX = dMIN( nMaxX, terrain->m_p_data->m_nWidthSamples - 1 );<br>        nMinZ = dMAX( nMinZ, 0 );<br>        nMaxZ = dMIN( nMaxZ, terrain->m_p_data->m_nDepthSamples - 1 );
<br>  <br>        dIASSERT ((nMinX < nMaxX) || (nMinZ < nMaxZ))   // <---- Generates the error <br>  <br>  <br>    }</p>
<p> </p>
<p>Best Regards </p>
<p>Teravus</p></div>