Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: Deleting a framebuffer makes my application crash

  1. #1
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    104

    Deleting a framebuffer makes my application crash

    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=
    MeTaL WiLL NeVeR DiE!!!!!

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,370

    Re: Deleting a framebuffer makes my application crash

    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?

  3. #3
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    104

    Re: Deleting a framebuffer makes my application crash

    Thanks for answering...

    I added the code you suggested before framebuffer deletion but it's still crashing.

    Code :
    	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT,0);
    	glDrawBuffer(GL_BACK);
    	glReadBuffer(GL_BACK);

    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.
    MeTaL WiLL NeVeR DiE!!!!!

  4. #4
    Junior Member Regular Contributor
    Join Date
    Dec 2007
    Location
    Brighton, UK
    Posts
    156

    Re: Deleting a framebuffer makes my application crash

    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)

  5. #5
    Junior Member Regular Contributor
    Join Date
    Dec 2000
    Location
    Almazora, Spain
    Posts
    104

    Re: Deleting a framebuffer makes my application crash

    Oh my god! It was a NULL pointer issue! My "glDeleteFramebuffersEXT" function NULL What a stupid mistake!

    Thank you all for your help!
    MeTaL WiLL NeVeR DiE!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •