Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56891

OpenGL drawing on OSX broken when Qt upgraded from 5.6.0 to 5.7.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.7.0
    • GUI: OpenGL
    • None
    • Mac OSX 10.11, different machines
    • macOS

    Description

      In our software, we use QOpenGLWidget to draw in OpenGL. It works in 5.6.0, but as soon as we upgraded to 5.7.0, it was broken on Mac OSX (while it continues to work on Windows). This is without any changes whatsoever in our own source code.

      What happens is that we get OpenGL error: "invalid operation" every other time when the OpenGL widget is redrawn, then after 10-15 redraw calls, we get OpenGL error: "stack overflow" every time it is redrawn (it needs to be redrawn because underlying data to present gets changed by user interaction).

      I digged furiously and finally found a piece of code in our application that made us suffer from changed behavior with Qt 5.7.0 - in the implementation of paintGL() in our own OpenGL widget subclass we did:

      GLenum err = glGetError();
      if (err != GL_NO_ERROR)

      { ... throw exception with GL error message }

      ...this exception is then caught and the message displayed in the open GL widget instead of showing what we were supposed to draw.

      I changed our behavior into just logging the error to a file and otherwise silently ignore the error, which then makes our application draw as expected again...

      (Can you supply a list of suspected deprecated features that we should look for when trying to find (latent) problems in our own source code?)

      I think Qt developers might still have something to examine here...this is for sure Mac OSX and Qt 5.7.0 specific.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            moonmartin Martin Hjelmstedt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes