View Full Version : Deleting a framebuffer makes my application crash
12-16-2008, 12:36 PM
When I try to delete a framebuffer because it is no longer used the application crashes.
The FB is complete and has been used successfully.
There are no OpenGL errors.
It has one color attachment as RGBA.
DEPTH-only attachments (as for shadow maps) don't crash
It crashes saying: "unhandled exception in 0x0000000 viewer.exe: 0xC000005.
How can I debug this error? Any ideas=
12-16-2008, 12:40 PM
This could happen for many reasons...a piece of code might help.
Do you return correctly to the default framebuffer, calling for example glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0) and setting the draw buffer to GL_BACK, if it is modified?
12-17-2008, 01:19 AM
Thanks for answering...
I added the code you suggested before framebuffer deletion but it's still crashing.
Any way it was supposed that if you delete the current FB, it automatically returns you to the main FB.
It's hard to put some pice of code because it's all scattered over my engine, if you want some piece of code in particular, please ask for it and I'll post it.
12-17-2008, 05:43 AM
Before deleting, use some sanity check functions for your framebuffer to make sure that it's ok & fine.
You can also use glIntercept to automatically track possible errors (just in case you use your own glGetError() scattered here & there)
12-17-2008, 08:32 AM
Oh my god! It was a NULL pointer issue! My "glDeleteFramebuffersEXT" function NULL :( What a stupid mistake!
Thank you all for your help!
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.