access violation on Win 98/Me

I get the following error in Visual C++ 6 console when running the OpenGL engine we are developing:

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

The application run fine except this per frame message (note: this is not present on 2k, XP). I was asking several people and all reported the same message in their OpenGL frameworks.

Also when running the program from Visual C in debug mode (F5) I’m getting and error from DDhelp (I know that is something regarding direct draw, used internally by OpenGL) every time I want to start the program (or any other OpenGL application) and the program terminates prematurely. To avoid this message and the crash, I have to run the program (or any other OpenGL program!) with Ctrl+F5 (not debug mode) or from a file manager, command prompt etc, only once and then I can run any program from Visual C debug mode as usual.

My opinion is that it has something to do with the poor support the OpenGL is getting on this platform lately (wgl internal error). Can anyone confirm the same problems?

So your saying that your GDI crash is opengl related?

I would say your code is broken/wrong, since I can debug with VC++ v6 +SP all the time with none of the issues you are having.

Could also be your hardware and or driver problem, since you do not say what you have, can’t help anymore than that.

http://support.microsoft.com/default.aspx?scid=KB;en-us;q233390

Strangely enough I found this on the OpenGL technical FAQ on this site…

As for your crashing problem, I used to have the same difficulties under 98se. And frankly I’m not surprised that the support is “poor” for Win98 as a platform - it’s 5 years old. Go get yourself a version of 2kpro or XP. Any of the NT flavoured OSes will handle crashes much better than the DOS flavoured ones.

This has been known since ancient times and noone has cracked the mistery.

But the access violation is typically not a problem and happen during certain gl operations (not just ChoosePixelFormat)

I have had this on NT and 2k as well and Im sure XP has the same issue.

The difference is not there are no issues with DDhelp.

Ok, thanks rgpc, this confirms my suspicion. I didn’t post any source because there is nothing special in the initialization code (and plus the code is commercial). I’m forced to use 98/Me (even though I usually program in Win 2k) because this is commercial product and some users can still have older OSes. Ok, thanks everyone.

I would recommend developing under Win2k and then testing under 98 (once all the major bugs in your code are figured out). It’ll save you a heap of headaches in the long run.

Essentially your Win98 testing just becomes a check to ensure your not doing anything that 98 doesn’t like (but that win2k does).