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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.14.2
    • Fix Version/s: None
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Platform/s:
      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

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            damian.dixon Damian Dixon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes