Strange behaviour with OpenGL/MFC/VC++ - Any Ideas?

Hello - i have a rather strange problem and i dont know where to begin…

ok. Im doing a MDI App in VC++ using MFC.
when i compile on debug occasionally i get a very strange error:

i can create as many views as i want the first time i run the app. I then run it again and as soon as the mouse is over a menu or icon it crashes with an un-handled exception

First-chance exception in Test.exe (GDI32.DLL): 0xC0000005: Access Violation

This then completely screws up my computer and i have to reset or else i get a fatel message box telling me explorer has a program fault whenever my mouse moves over an icon.

when i compile in release mode everything works. If i run it inside the VC++ environment it says i still get the Access violation but it doesnt crash.

has anyone come accross this kind of behaviour before? I’m using a 3D Prophet II MX (Geforce 2 MX) and i’m wondering if it maybe a driver problem?

any advice would be really appreciated.


When using MFC and OpenGL, the last thing to suspect when a crash occures is the driver !

It is very difficult to tell you what happens from here… You could forget to destroy rendering contexts, destroy them in the wrong order, …

If you want, you can e-mail me a source sample that I will debug…



I’ve had this happen to me, but it’s very rare.

Anyway, you should get service release 4. Also, are you on win98 and a p3? there is some problem in debug mode running on that. Several people had this, some as serious as yours.