[ODE] ODE freezes, can you help?

Ivan Bolcina ivan.bolcina at volja.net
Wed Dec 18 10:12:02 2002


This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C2A67E.9C9A8E60
Content-Type: text/plain;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Actually, it doesn't freeze. It takes a 5 seconds to calculate next =
frame, and then object colliding are thrown somewhere out of sigth. In =
next frame, this repeats. How to debug it? It's fullscreen directx game.
This bug occured, when I CVSed lates version of ode.

  ----- Original Message -----=20
  From: Ivan Bolcina=20
  To: ode@q12.org=20
  Sent: Monday, December 16, 2002 10:33 PM
  Subject: [ODE] ODE freezes, can you help?


  Hi. I create  "dJointCreateContact" by hand. Sometimes works just =
fine, sometimes it crashes application. Am I initializing structures =
wrongly? Or what??



  dContact contact;        //contact
  contact.surface.mode =3D dContactBounce; //bounce??
  contact.surface.mu =3D 1;        // ???
  contact.surface.bounce =3D 0.5f;    //????
  contact.surface.bounce_vel =3D 0.1f;/????
  convertVector(diff,contact.geom.normal);  // copy DirectX D3DXVECTOR3 =
to dVector3, normal
  convertVector(m_Position-diff,contact.geom.pos);    //copy DirectX =
D3DXVECTOR3 to dVector3,position
  D3DXVECTOR3 spe=3Dmove-tmp->move; //approximal depth calculation
  len=3DD3DXVec3Length(&spe);
  len*=3Dapp->getElapsedTime();
  contact.geom.depth=3D5+len;
  contact.geom.g1=3Dthis->PhyGeom;        // assign Geom of first body
  contact.geom.g2=3Dtmp->PhyGeom;    //assign Geom of second body
  dJointID c =3D dJointCreateContact =
(app->world,app->contactgroup,&contact);    // create join
  dJointAttach (c,this->PhyBody,tmp->PhyBody);        // add it

------=_NextPart_000_0016_01C2A67E.9C9A8E60
Content-Type: text/html;
	charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-2">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>Actually, it doesn't freeze. It takes a 5 seconds to =
calculate=20
next frame, and then object colliding are thrown somewhere out of sigth. =
In next=20
frame, this repeats. How to debug it? It's fullscreen directx =
game.</FONT></DIV>
<DIV><FONT size=3D2>This bug occured, when I CVSed lates version of=20
ode.</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Divan.bolcina@volja.net =
href=3D"mailto:ivan.bolcina@volja.net">Ivan=20
  Bolcina</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A title=3Dode@q12.org=20
  href=3D"mailto:ode@q12.org">ode@q12.org</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, December 16, 2002 =
10:33=20
  PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [ODE] ODE freezes, can =
you=20
  help?</DIV>
  <DIV><BR></DIV>
  <DIV>
  <DIV><FONT size=3D2>
  <P>Hi. I create&nbsp; "dJointCreateContact" by hand. Sometimes works =
just=20
  fine, sometimes it crashes application. Am I initializing structures =
wrongly?=20
  Or what??</P>
  <P>&nbsp;</P>
  <P><FONT face=3D"Courier New">dContact contact;&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; //contact<BR></FONT><FONT=20
  face=3D"Courier New">contact.surface.mode =3D dContactBounce;=20
  //bounce??<BR></FONT></FONT><FONT size=3D2><FONT=20
  face=3D"Courier New">contact.surface.mu =3D 1;&nbsp;&nbsp;&nbsp;=20
  &nbsp;&nbsp;&nbsp; // ???<BR></FONT><FONT=20
  face=3D"Courier New">contact.surface.bounce =3D =
0.5f;&nbsp;&nbsp;&nbsp;=20
  //????<BR></FONT><FONT face=3D"Courier New">contact.surface.bounce_vel =
=3D=20
  0.1f;/????<BR></FONT><FONT=20
  face=3D"Courier New">convertVector(diff,contact.geom.normal);&nbsp; // =
copy=20
  DirectX D3DXVECTOR3 to dVector3, normal<BR></FONT><FONT=20
  face=3D"Courier =
New">convertVector(m_Position-diff,contact.geom.pos);&nbsp;&nbsp;&nbsp;=20
  //copy DirectX D3DXVECTOR3 to dVector3,position<BR></FONT><FONT=20
  face=3D"Courier New">D3DXVECTOR3 spe=3Dmove-tmp-&gt;move; //approximal =
depth=20
  calculation<BR></FONT><FONT=20
  face=3D"Courier New">len=3DD3DXVec3Length(&amp;spe);<BR></FONT><FONT=20
  face=3D"Courier New">len*=3Dapp-&gt;getElapsedTime();<BR></FONT><FONT=20
  face=3D"Courier New">contact.geom.depth=3D5+len;<BR></FONT><FONT=20
  face=3D"Courier New">contact.geom.g1=3D</FONT></FONT><FONT =
face=3D"Courier New"=20
  color=3D#0000ff size=3D2>this</FONT><FONT size=3D2><FONT=20
  face=3D"Courier New">-&gt;PhyGeom;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; //=20
  assign Geom of first body<BR></FONT><FONT=20
  face=3D"Courier =
New">contact.geom.g2=3Dtmp-&gt;PhyGeom;&nbsp;&nbsp;&nbsp; //assign=20
  Geom of second body<BR></FONT><FONT face=3D"Courier New">dJointID c =
=3D=20
  dJointCreateContact=20
  (app-&gt;world,app-&gt;contactgroup,&amp;contact);&nbsp;&nbsp;&nbsp; =
// create=20
  join<BR></FONT><FONT face=3D"Courier New">dJointAttach =
(c,</FONT></FONT><FONT=20
  face=3D"Courier New"><FONT color=3D#0000ff size=3D2>this</FONT><FONT=20
  size=3D2>-&gt;PhyBody,tmp-&gt;PhyBody);&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; //=20
  add it</P></FONT></FONT></DIV></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0016_01C2A67E.9C9A8E60--