[ODE] Fixing the SDL/win32 incompatibility

Thomas Harte thomasharte at lycos.co.uk
Sun Sep 22 11:18:01 2002


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_0233051032718615_ID
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

I now have it confirmed by members of the SDL community that something which outputs to stderr as part of either the C atexit list or due to some globally defined classes with destructors in C++ under win32 is likely to crash the system. ODE falls into this set.

There are two obvious fixes. The first would be to add :

dCreate() / dDestroy()

Which work to initialise and deinitialise the entire ODE library. Now there are no globally defined classes (maybe some global pointers to classes, but whatever), or else you can call dDestroy yourself rather than leave it to atexit in order to be sure of when it executes in relation to everything else.

The second would be to have ODE generate a file "ode.log" and output to that rather than using stderr if it is being built under win32. This would actually be the better solution not just due to API consistency, but also because most win32 applications don't have a console, and on 95/98/ME, building with a console can cause some graphics cards to refuse various types of acceleration.

Thoughts? Comments? Anyone? Worth submitting a patch via CVS?

-Thomas
______________________________________________________
Check out all the latest outrageous email attachments on the Outrageous Email Chart! - http://viral.lycos.co.uk	


--=_NextPart_Caramail_0233051032718615_ID--