[ODE] dMessage crashes my system

Jon Watte hplus-ode at mindcontrol.org
Mon Mar 29 09:42:02 MST 2004


Typically when stdout functions crash in MSDEV, you are not linking with the correct version of the runtime libraries for your compiler. I e, perhaps ODE was linked with DLL Debug Runtime, and your app with Single-Threaded Static runtime.

Typically, you need to set everything to link to the DLL multi-threaded runtime, and make sure you use all Debug components if you're making a debug build, and all Release components if you're making a release build. Yes, this means you gotta build ODE twice: once for debug, once for release.

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Santi
Ontañón
Sent: Monday, March 29, 2004 7:14 AM
To: ode at q12.org
Subject: [ODE] dMessage crashes my system


Hi everybody,

I'm new to ODE, and I'm having some problems. I use ODE 0.039 compiled 
using VC++ 6.0 for windows (I use Windows ME). After several sucessful 
trials with some cubes and joints, I've found a scenario where ODE 
crashes my system. I've traced the problem, and the program crashes in 
this point of the code in the file lcp.cpp:

...
    // if s <= 0 then we've got a problem. if we just keep going then
    // we're going to get stuck in an infinite loop. instead, just cross
    // our fingers and exit with the current solution.
    if (s <= 0) {
      dMessage (d_ERR_LCP, "LCP internal error, s <= 0 (s=%.4e)",s);
      if (i < (n-1)) {
        dSetZero (x+i,n-i);
        dSetZero (w+i,n-i);
      }
      goto done;
    }
...

It exactly crashes when callind "dMessage", and in more detail, it 
crashes inside dMessage in this function (in file error.cpp):

static void printMessage (int num, const char *msg1, const char *msg2,
              va_list ap)
{
  fflush (stderr);
  fflush (stdout);
  if (num) fprintf (stderr,"\n%s %d: ",msg1,num);
  else fprintf (stderr,"\n%s: ",msg1);
  vfprintf (stderr,msg2,ap);
  fprintf (stderr,"\n");
  fflush (stderr);
}

The crash occurs when calling "fflush(stderr)".
Anyone knows how to solve this problem? I'm tempted to simply delete the 
call do "dMessage", but I'd like a "neater" solution!

thanks in advance

santi

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list