Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unhandled Exception using QGLFunctions on Release mode only
Qt 6.11 is out! See what's new in the release blog

Unhandled Exception using QGLFunctions on Release mode only

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theoribeiro
    wrote on last edited by
    #1

    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()
    {

    initializeGLFunctions(this->context());

    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,

    Theo

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved