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

QOpenGLWidget crash during destruction when it was never shown in GUI

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.0
    • GUI: OpenGL
    • None

    Description

      If an object of subclassed QOpenGLWidget is created but never show e.g. using of two tabs in QTabWidget and adding a subclassed QOpenGLWidget object to a hidden tab results in never generated resizeEvent of this object. By closing the application the destructor of the QOpenGLWidget is called which involves the calling of reset() method of the private QOpenGLWidget class (QOpenGLWidgetPrivate). Inside the reset() method the paintDevice object is deleted without any check for existence, but if the initialize() method was never called before, which is the case if resizeEvent is not occurred, the paintDevice object was never constructed and the pointer is zero.

      I think some check for zero pointer of paintDevice inside of the reset() method is necessary.

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            stasikz Stanislav Tereschenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes