Unhandled Exception using QGLFunctions on Release mode only

  • Hello all,

    I'm having some trouble while compiling my project on Windows 7 using Qt 4.8 on Release mode. Everything works fine on Debug, but on Release I get an Unhandled Exception: 0xC0000005: Access violation.
    I narrowed it down to the line where this happens, which is when I generate my Pixel Buffers.
    My first guess would be wrong DLLs loading, but I checked the executable with Dependency Walker and every DLL loaded is correct.

    Here goes some of my code:

    class CameraView : public QGLWidget, protected QGLFunctions;
    void CameraView::initializeGL()


    glGenBuffers(1, &pbo_); //<<<<< This is where I get the unhandled exception on Release mode
    glBindBuffer(QGLBuffer::PixelUnpackBuffer, pbo_);
    glBufferData(QGLBuffer::PixelUnpackBuffer, 3 * sizeof(BYTE) * image_width_ * image_height_, NULL, GL_STREAM_DRAW);

    Again, this works great on debug. Do you have any clue of why this is happening on Release only?

    Thanks in advance,


Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.