Opengl crashing badly

Man this is pissing me off so much…

Whenever i compile any OpenGL program at all, even if they have a blank screen, and i don’t use any opengl commands at all, it still crashes…

All of Glut stuff crashes, and NeHe stuff too…

Im using Borland C++Builder 3.0, and i have the lastest Opengl32.lib, Glu32.lib, and glut.lib files which have been converted to Borland…

This only started happening after i installed the detonator2 drivers… Every other Opengl app runs fine, Quake2/3 runs great, Mark’s Opalis demo run fine…

I have tried compiling programs using Opengl 1.1 libs, and opengl 1.2 libs, and dynamically linking to OpenGL32.dll and mapping out all the function calls at runtime… They all seem to crash…

There is a problem with the floating point on the borland compilers and opengl, but borland says to use this:

#ifdef BORLANDC
#include <float.h>
#endif /* End BORLANDC */

/*----- Inside WinMain ------ /
#ifdef BORLANDC
_control87( MCW_EM, MCW_EM );
#endif /
End BORLANDC */

And that will fix things up… I don’t know why it crashes…

heres the link to some excutables…
http://www.ompac.net.au/~troyfa/GLTest.zip

There’s 3 files… One uses the dynamic runtime binding to OpenGL32.dll, and resolves all the opengl functions at runtime… To see what i mean, right click on any of the exes, and select quick view… There should be an import listing declaration… Two of the files, will have Opengl32.dll with the appropiate functions… The other one dosn’t have this, it’ll be blank, that one is the dynamic version…

Those programs will crash your system forcing a reboot, or they will crash programs that are run afterwards… However it won’t crash on all systems, i don’t know why…

So if anyone here knows why this happens, let us know, becuase it’s a friggen pain…

The GLTest11.exe and GLTest12.exe uses one of NeHe demo code, nothing has changed except for the font, Title bar, and the color of the font, everything else remains the same…

Hi,

I’ve tested your apps. and they worked fine,
I think it’s a matter of non-working drivers, to test this you should copy a version of OpenGL32.dll for your graphics card or use the software version of microsoft. Or you even could try to use the DX 6 OpenGL driver of altsoftware, you can download it from: http://www.altsoftware.com/demos/altogl.exe
(run the exec and rename the .dll to opengl32.dll).

Hope this helps,

Daniel Palomo van Es

glut was often crashing on me when I forgot to put some keyboard or mouse callback or to say that there were none.

I recompiled the demos with Visual C++ Introductory edition…

The only one working fine is the dynamic linking version, it runs great no probs… The Font one runs fine about 10 times in a row, then that will crash around the tenth run or so…

I suspect it could be a calling problem or something… Some calling convections push parameters right to left and calling function cleans the stack( C )… other push parameters left to right( PASCAL )…
And sometimes the calling function pop the stack ( stdcall )…

Heres my project options i use…
[ul][li]486 target CPU []C Calling convection []No register variables[]Correct Pentium FDIV Flaw ( used in trig tables )[]Smart virtual tables[]Map file off[]No debug info[/ul][/li]
Heres the stack and heap size, maybe i should of put this first…
[ul][li]Min stack size == 0x00002000[]Max stack size == 0x00100000[]Min heap size == 0x00001000[]Max heap size == 0x00100000[]Image base == 0x00400000[/ul][/li]
All those are the recommended stack/heap size for a window32 application…

I so confused now…