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

Crash in QWindow::event if "delete this" called in QDialog::closeEvent

    XMLWordPrintable

Details

    • 036c3c19e7da5f1a280750d3c68a0cff38678029 (qt/qtbase/dev) 62b08b50d05098d8215fcf59c23096dbc7420f45 (qt/qtbase/5.15) 710777d5d32ef13f2037cfe58e40ff2343355759 (qt/qtbase/5.12) 1e42f022cc763a7fa67887bee078d37faa6c4a86 (qt/qtbase/5.12.9)

    Description

      Calling delete this in QDialog::closeEvent causes a crash starting from Qt 5.11 due to https://codereview.qt-project.org/c/qt/qtbase/+/227398.

      qt\qtbase\src\gui\kernel\qwindow.cpp:625: error: Debugger encountered an exception: Exception at 0x7ffe90fca11d, code: 0xc0000005: read access violation at: 0xffffffffffffffff, flags=0x0 (first chance)

      Call stack:

      1 QWindow::isVisible qwindow.cpp 625 0x7ffe90fca11d
      2 QWindow::event qwindow.cpp 2325 0x7ffe90fce3e5
      3 QWidgetWindow::event qwidgetwindow.cpp 255 0x7ffe93525d02
      4 QApplicationPrivate::notify_helper qapplication.cpp 3685 0x7ffe93472c4f
      5 QApplication::notify qapplication.cpp 3025 0x7ffe9346ce07
      6 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1075 0x7ffe92c12aa0
      7 QCoreApplication::sendSpontaneousEvent qcoreapplication.cpp 1483 0x7ffe92c1293b
      8 QGuiApplicationPrivate::processCloseEvent qguiapplication.cpp 2562 0x7ffe90fa9332
      9 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 1981 0x7ffe90faa235
      10 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 1176 0x7ffe90f74602
      11 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 83 0x7ffeae0567d2
      12 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 525 0x7ffe92ce4b6e
      13 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 74 0x7ffeae056784
      14 QEventLoop::processEvents qeventloop.cpp 139 0x7ffe92c0d1cd
      15 QEventLoop::exec qeventloop.cpp 225 0x7ffe92c0d41f
      16 QCoreApplication::exec qcoreapplication.cpp 1383 0x7ffe92c1076a
      17 QGuiApplication::exec qguiapplication.cpp 1861 0x7ffe90fa2aa8
      18 QApplication::exec qapplication.cpp 2826 0x7ffe9346c71a
      19 main main.cpp 35 0x7ff71cf4159f
      20 invoke_main exe_common.inl 79 0x7ff71cf41e44
      ... <More>

      Steps to reproduce the crash:

      1. Run the attached example
      2. Close the dialog window

      Attachments

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

        Activity

          People

            miikapernu Miika Pernu
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: