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

QOpenGLDebugLogger destructor segfaults when no context is active

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.2
    • 5.6.1, 5.7.0
    • GUI: OpenGL
    • None
    • This is on Windows 10, 64-bit, Qt Downloaded from website.
    • 107ac187bcc3c552217181a3b247ed5f31a9cb49

    Description

      Running the following code outputs "true" four times (meaning all operations are successful) and then crashes in the QOpenGLDebugLogger destructor:

      #include <QApplication>
      #include <QDebug>
      #include <QOffscreenSurface>
      #include <QOpenGLContext>
      #include <QOpenGLDebugLogger>
      
      int main(int argc, char **argv) {
        // Start application
        QApplication application{argc, argv};
      
        QSurfaceFormat format;
        format.setOption(QSurfaceFormat::DebugContext);
      
        QOffscreenSurface surface;
        surface.setFormat(format);
        surface.create();
        qDebug() << surface.isValid();
      
        QOpenGLContext context;
        context.setFormat(format);
        qDebug() << context.create();
        qDebug() << context.isValid();
      
        context.makeCurrent(&surface);
      
        QOpenGLDebugLogger logger;
        qDebug() << logger.initialize();
        logger.startLogging(QOpenGLDebugLogger::SynchronousLogging);
      
        context.doneCurrent();
      
        return 0;
      }
      

      Attachments

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

        Activity

          People

            peppe Giuseppe D'Angelo
            rggjan Jan Rüegg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes