Crash when re-opening OpenGL Windows
I have a small project I''m developing, working through the (awesome!) NeHe tutorials to learn the GL skills I need for it.
Anyway, my app is going well, but ever since the first tutorial I''ve had a bug that I need to fix soon. Basically, the *second* time I try to open a full-screen GL window, the PC crashes. A BSOD, but not the typical windows BSOD; there''s just a bit of white text at the very top, reporting an incorrect memory address error in the video driver. This happens even if I close the application completely and restart it. If I try to open two windows in a row without restarting the machine ... boom.
I can generally open many non-fullscreen GL windows in a row without a problem. But, even those will usually crash if I''ve opened a fullscreen window beforehand.
The system is a Gateway 5300 laptop with an S3 Inc. Savage/IX card. I''m coding in Borland C++ Builder 5.0. Windows 2000 professional.
In terms of code, this problem happens on every single NeHe tutorial from 0 through 10, with the code unchanged from the default. It doesn''t seem to be resolution dependent, as I''ve seen essentially identical behavior at 640x480, 800x600, and 1024x768.
Anyway, I''m going to have to dig into this problem pretty soon, since I need to fix it before I deliver the product. But I thought I''d ask if anyone can suggest strategies before I dig into it: a little extra knowledge will go a long way, since my familiarity with Win32 coding is slim; most of my development work is either for linux or OS X on mac hardware, or for web applications that are hardware independent.
Thanks so much,
Ev
business: www.lrdesign.compersonal: www.idahoev.com
sounds awefully like a driver bug, or an issue that the tuts arn''t relesing all resources correctly on exit... if you have any other fullscreen GL apps, how do they run?
| - Project-X - my mega project.. getting warmer
- | - adDeath - an ad blocker I made - | - email me - |
| - Project-X - my mega project.. getting warmer

I could be wrong, but I think I recall this being a bug in the early tutorials, and I think it''s actually addressed and resolved in a later tutorial, perhaps the milkshape model one, I can''t recall what the problem is though.
--"The greatest pleasure in life is in doing what people say you cannot do." -- Walter Bageholt
there was some little problem that they fixed in the later tutorials, with defining CDS_FULLSCREEN, but I don''t know if that''s quite it...
> if you have any other fullscreen GL apps, how do they run?
I don''t think this machine does have any other fullscreen GL apps on it. Can you suggest a simple, normally stable, one I can download to check?
Thanks,
Ev
I don''t think this machine does have any other fullscreen GL apps on it. Can you suggest a simple, normally stable, one I can download to check?
Thanks,
Ev
business: www.lrdesign.compersonal: www.idahoev.com
There was an issue in the very very very old basecode, but that was updated many years ago... it sounds to me like a driver issue.
Test one of the more recent tutorials and see if the issue still occurs.
Test one of the more recent tutorials and see if the issue still occurs.
I''ve got the same problem. I''m running Windows Millenium (Trying to upgrade soon). AMD Athlon and a low budget nVidea GeForce 4 MX420. What is really confusing is the fact that (like earlier) when I was programming a picking engine my code worked perfectly.
Well the power went out. I reboot my computer and now I have to reboot my computer after each run of the code. Very annoying.
I don''t know what makes it work again, but after about a week it relapsed into working again.
NOTE: I have run the same code on a Windows 2000 machine with lower specs and had no problems at all.
Bryce
Well the power went out. I reboot my computer and now I have to reboot my computer after each run of the code. Very annoying.
I don''t know what makes it work again, but after about a week it relapsed into working again.
NOTE: I have run the same code on a Windows 2000 machine with lower specs and had no problems at all.
Bryce
so I''ve tested this problem a bunch more. It''s crashing on this line:
if(!SetPixelFormat(hDC,PixelFormat,&pfd))
{
...
I have tested some other OpenGL applications and found that some crash, but not always in the same way. Sometimes in them I *can* run fullscreen windows more than once.
Here are more detailed conditions:
1) Opening fullscreen window in my app for the second time since reboot = crash
2) opening non-fullscreen GL window in my app after a fullscreen window = crash
3) opening fullscreen GL window in my app after running a different opengl app = crash
4) opening non-fullscreen GS window in my app after running a different opengl app = no crash, but render maybe 0.5 fps.
(no, 0.5 is not a typo.)
Sooo... I''m guessing it''s pretty hopeless. Gateway has an updated driver on their website, but it won''t install. I''ll bug them on the phone later today.
Unfortunately, the client paying me to write this thing for them insists on running it on this particular laptop. Grrrr....
Well, if anyone has any thoughts that might help me here, I''d be most appreciative.
Thanks,
Ev
if(!SetPixelFormat(hDC,PixelFormat,&pfd))
{
...
I have tested some other OpenGL applications and found that some crash, but not always in the same way. Sometimes in them I *can* run fullscreen windows more than once.
Here are more detailed conditions:
1) Opening fullscreen window in my app for the second time since reboot = crash
2) opening non-fullscreen GL window in my app after a fullscreen window = crash
3) opening fullscreen GL window in my app after running a different opengl app = crash
4) opening non-fullscreen GS window in my app after running a different opengl app = no crash, but render maybe 0.5 fps.
(no, 0.5 is not a typo.)
Sooo... I''m guessing it''s pretty hopeless. Gateway has an updated driver on their website, but it won''t install. I''ll bug them on the phone later today.
Unfortunately, the client paying me to write this thing for them insists on running it on this particular laptop. Grrrr....
Well, if anyone has any thoughts that might help me here, I''d be most appreciative.
Thanks,
Ev
business: www.lrdesign.compersonal: www.idahoev.com
Don''t know what to tell you, I''m stuck too.
I have the same problems you do though.
I have the same problems you do though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement