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

QGLContext::makeCurrent() crashes due to d->guiGlContext being null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.14.2
    • GUI: OpenGL
    • None
    • Linux/X11

    Description

      On destruction of a Widget derived from QGLWidget a call to makeCurrent() within the Widget's destructor on the widget resulted in a SEGFAULT.

      The crash occurs on line 3586:

      if (d->guiGlContext->makeCurrent(widget->windowHandle())) {

      due to d->guiGlContext being null.

      There are quite a few other places where d->guiGlContext is not checked for being a null ptr within this file.

      I've also looked at the 5.15.4 and there are very few checks for d->guiGlContext being a null ptr.

      This problem does not occur if the Widget is derived from QOpenGLWidget.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            damian.dixon Damian Dixon
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes