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

Crash when quitting nested event-loop while QTableView is visible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.1.0
    • Widgets: Itemviews
    • None
    • Windows 7 x64, MSVC10 x86, self-built Qt 5.1.0

      When quitting a QtWidgets based application from inside a nested event-loop (i.e. modal QDialog) while a QTableView is visible the following crash can be observed:

       	Qt5Guid.dll!QWindow::handle()  Line 1504 + 0x3 bytes	C++
       	Qt5Widgetsd.dll!QApplicationPrivate::isWindowBlocked(QWindow * window=0x02147280, QWindow * * blockingWindow=0x0038eb6c)  Line 2285 + 0x9 bytes	C++
       	Qt5Widgetsd.dll!QApplicationPrivate::isBlockedByModal(QWidget * widget=0x0038fc18)  Line 2241 + 0x1f bytes	C++
       	Qt5Widgetsd.dll!QWidget::palette()  Line 4172 + 0x27 bytes	C++
       	Qt5Widgetsd.dll!QStyleOption::init(const QWidget * widget=0x020fe248)  Line 228 + 0x8 bytes	C++
       	Qt5Widgetsd.dll!QAbstractScrollAreaPrivate::layoutChildren()  Line 343	C++
       	Qt5Widgetsd.dll!QAbstractScrollArea::setViewportMargins(int left=0x00000000, int top=0x00000000, int right=0x00000000, int bottom=0x00000000)  Line 923	C++
       	Qt5Widgetsd.dll!QTableView::updateGeometries()  Line 2076	C++
       	Qt5Widgetsd.dll!QAbstractItemView::qt_static_metacall(QObject * _o=0x020fe248, QMetaObject::Call _c=InvokeMetaMethod, int _id=0x00000018, void * * _a=0x0038f190)  Line 391 + 0x10 bytes	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x021123c8, int signalOffset=0x0000000a, int local_signal_index=0x00000008, void * * argv=0x00000000)  Line 3479 + 0x2e bytes	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x021123c8, const QMetaObject * m=0x70cebb98, int local_signal_index=0x00000008, void * * argv=0x00000000)  Line 3354 + 0x1e bytes	C++
       	Qt5Widgetsd.dll!QHeaderView::geometriesChanged()  Line 423 + 0x13 bytes	C++
       	Qt5Widgetsd.dll!QHeaderView::viewportEvent(QEvent * e=0x0038f99c)  Line 2546	C++
       	Qt5Widgetsd.dll!QAbstractScrollAreaPrivate::viewportEvent(QEvent * event=0x0038f99c)  Line 105 + 0x28 bytes	C++
       	Qt5Widgetsd.dll!QAbstractScrollAreaFilter::eventFilter(QObject * o=0x02112410, QEvent * e=0x0038f99c)  Line 121 + 0x29 bytes	C++
       	Qt5Cored.dll!QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject * receiver=0x02112410, QEvent * event=0x0038f99c)  Line 967 + 0x15 bytes	C++
       	Qt5Widgetsd.dll!QApplicationPrivate::notify_helper(QObject * receiver=0x02112410, QEvent * e=0x0038f99c)  Line 3451 + 0x11 bytes	C++
       	Qt5Widgetsd.dll!QApplication::notify(QObject * receiver=0x02112410, QEvent * e=0x0038f99c)  Line 3420 + 0x10 bytes	C++
       	Qt5Cored.dll!QCoreApplication::notifyInternal(QObject * receiver=0x02112410, QEvent * event=0x0038f99c)  Line 871 + 0x15 bytes	C++
       	Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver=0x02112410, QEvent * event=0x0038f99c)  Line 232 + 0x39 bytes	C++
       	Qt5Widgetsd.dll!QWidgetPrivate::hideChildren(bool spontaneous=false)  Line 7428 + 0xe bytes	C++
       	Qt5Widgetsd.dll!QWidgetPrivate::hideChildren(bool spontaneous=false)  Line 7424	C++
       	Qt5Widgetsd.dll!QWidgetPrivate::hideChildren(bool spontaneous=false)  Line 7424	C++
       	Qt5Widgetsd.dll!QWidgetPrivate::hide_helper()  Line 7186	C++
       	Qt5Widgetsd.dll!QWidget::setVisible(bool visible=false)  Line 7345	C++
       	Qt5Widgetsd.dll!QWidget::hide()  Line 7146	C++
       	Qt5Widgetsd.dll!QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode mode=CloseNoEvent)  Line 7474	C++
       	Qt5Widgetsd.dll!QWidget::~QWidget()  Line 1414	C++
       	Qt5Widgetsd.dll!QMainWindow::~QMainWindow()  Line 379 + 0x22 bytes	C++
       	addressbook.exe!MainWindow::~MainWindow()  + 0x10 bytes	C++
      >	addressbook.exe!main(int argc=0x00000001, char * * argv=0x020da768)  Line 43 + 0x15 bytes	C++
       	addressbook.exe!WinMain(HINSTANCE__ * instance=0x00c00000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x003c5f95, int cmdShow=0x0000000a)  Line 131 + 0x12 bytes	C++
       	addressbook.exe!__tmainCRTStartup()  Line 547 + 0x2c bytes	C
       	addressbook.exe!WinMainCRTStartup()  Line 371	C
       	kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes
       	ntdll.dll!77649f72()
       	[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
       	ntdll.dll!77649f45()
      

      Steps to reproduce:

      • build + start addressbook example
      • Click on Add toolbar-button
      • Click on Crash push-button

      Looking at QWidget::palette() code I guess this only happens on Windows since QApplicationPrivate::isWindowBlocked() is windows-specific.

        1. addressbook.zip
          1 kB
          Stefan Gehn
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            metz Stefan Gehn (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes