Archived

This topic is now archived and is closed to further replies.

Crash on deleting render context?

This topic is 5316 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an app I''ve been working on for a while. I haven''t had to deal with the details of creating or deleting the GL window, really; the tutorial code worked fine and I''ve just been working on the UI and behavior of the simulation. But all of a sudden, my program has started crashing (dumping me into a CPU debugger) when it tries to execute the following line: if (!wglDeleteContext(hRC)) { ... Which is really strange, because I haven''t changed anything related to the window handling... anywhere, in at least a month. The last thing I even changed to my entire rendering package (which is it''s own class) is add some bitmapped fonts. I''ve tried moving the KillFont() call up before the wglDeleteContext call just in case, but that didn''t help. I''m really stumped, because I can''t think of anything I change that would have caused this. Anyone have any ideas where I should start looking?

Share this post


Link to post
Share on other sites
Comment out everything between your OpenGL initialization, and OpenGL shutdown. Then uncomment things, one or two at a time, until you figure out what general part of your code is causing the problem. Then go into that code, comment it all out, then uncomment things one or two at a time, narrowing it down.

Share this post


Link to post
Share on other sites
Would you by any chance happen to be binding a -1 texture? I found that on my system, if I bound a texture to -1 it would cause a crash on context release. Took me a while to figure that one out...

Of course that may be something totally different but thats the best guess I can come up with.

Share this post


Link to post
Share on other sites