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

Crash in QSortFilterProxyModel on a full model reset

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.7.3
    • Widgets: Itemviews
    • Verified on Linux (openSUSE 11.3) and Mac OS X (10.5.8 and 10.6.x)

    Description

      Setup: One custom abstract item model, two attached proxy models that do filtering and ordering.

      Up until Qt 4.6.3 this worked perfectly, i.e. single row insertions and row deletions as well as full model resets worked as expected. From Qt 4.7.0 onwards (tested with 4.7.0, 4.7.1 and 4.7.3) I however get many crashes, on either action. A simple full model reset already triggers the first one:

      #0  0xffffe424 in __kernel_vsyscall ()
      #1  0xb77c17ff in raise () from /lib/libc.so.6
      #2  0xb77c3140 in abort () from /lib/libc.so.6
      #3  0x08192cdd in guitoneMsgHandler (type=QtFatalMsg, msg=0x93ad170 "ASSERT: \"it.value()\" in file itemviews/qsortfilterproxymodel.cpp, line 193")
          at src/main.cpp:55
      #4  0x089990ee in qt_message_output (msgType=QtFatalMsg, buf=0x93ad170 "ASSERT: \"it.value()\" in file itemviews/qsortfilterproxymodel.cpp, line 193")
          at global/qglobal.cpp:2228
      #5  0x089992f6 in qt_message (msgType=QtFatalMsg, msg=0x8c5d3c4 "ASSERT: \"%s\" in file %s, line %d", ap=0xbfffdfd4 "\206\356\273\b")
          at global/qglobal.cpp:2328
      #6  0x0899967b in qFatal (msg=0x8c5d3c4 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2511
      #7  0x08998d40 in qt_assert (assertion=0x8bbee86 "it.value()", file=0x8bbee00 "itemviews/qsortfilterproxymodel.cpp", line=193) at global/qglobal.cpp:2027
      #8  0x086f4f3f in QSortFilterProxyModelPrivate::index_to_iterator(QModelIndex const&) const ()
      #9  0x086ecc63 in QSortFilterProxyModelPrivate::proxy_to_source (this=0x9256ff0, proxy_index=...) at itemviews/qsortfilterproxymodel.cpp:367
      #10 0x086f4118 in QSortFilterProxyModel::mapToSource (this=0x9256fc8, proxyIndex=...) at itemviews/qsortfilterproxymodel.cpp:2499
      #11 0x086f1767 in QSortFilterProxyModel::hasChildren (this=0x9256fc8, parent=...) at itemviews/qsortfilterproxymodel.cpp:1693
      #12 0x086b8e35 in QTreeView::doItemsLayout (this=0x924b958) at itemviews/qtreeview.cpp:2024
      #13 0x086bef50 in QTreeViewPrivate::updateScrollBars (this=0x924b9e8) at itemviews/qtreeview.cpp:3439
      #14 0x086bbbbe in QTreeView::updateGeometries (this=0x924b958) at itemviews/qtreeview.cpp:2686
      #15 0x0866f6eb in QAbstractItemView::doItemsLayout (this=0x924b958) at itemviews/qabstractitemview.cpp:1148
      #16 0x086b8e67 in QTreeView::doItemsLayout (this=0x924b958) at itemviews/qtreeview.cpp:2027
      #17 0x086747a4 in QAbstractItemView::timerEvent (this=0x924b958, event=0xbfffedd4) at itemviews/qabstractitemview.cpp:2426
      #18 0x086b5264 in QTreeView::timerEvent (this=0x924b958, event=0xbfffedd4) at itemviews/qtreeview.cpp:1209
      #19 0x08a8a206 in QObject::event (this=0x924b958, e=0xbfffedd4) at kernel/qobject.cpp:1181
      #20 0x0822c819 in QWidget::event (this=0x924b958, event=0xbfffedd4) at kernel/qwidget.cpp:8718
      #21 0x08579998 in QFrame::event (this=0x924b958, e=0xbfffedd4) at widgets/qframe.cpp:557
      #22 0x085f7b61 in QAbstractScrollArea::event (this=0x924b958, e=0xbfffedd4) at widgets/qabstractscrollarea.cpp:996
      #23 0x086700e6 in QAbstractItemView::event (this=0x924b958, event=0xbfffedd4) at itemviews/qabstractitemview.cpp:1564
      #24 0x081da604 in QApplicationPrivate::notify_helper (this=0x8fd1858, receiver=0x924b958, e=0xbfffedd4) at kernel/qapplication.cpp:4462
      #25 0x081da343 in QApplication::notify (this=0x8fd16f0, receiver=0x924b958, e=0xbfffedd4) at kernel/qapplication.cpp:4427
      #26 0x0818a463 in GuitoneCore::notify (this=0x8fd16f0, object=0x924b958, event=0xbfffedd4) at src/GuitoneCore.cpp:126
      #27 0x08a7624f in QCoreApplication::notifyInternal (this=0x8fd16f0, receiver=0x924b958, event=0xbfffedd4) at kernel/qcoreapplication.cpp:731
      #28 0x081cd7a3 in QCoreApplication::sendEvent(QObject*, QEvent*) ()
      #29 0x08aa1e15 in QTimerInfoList::activateTimers (this=0x8fd799c) at kernel/qeventdispatcher_unix.cpp:604
      #30 0x08a9eac2 in timerSourceDispatch (source=0x8fd7968) at kernel/qeventdispatcher_glib.cpp:184
      #31 0xb7a93b49 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
      #32 0xb7a94350 in ?? () from /usr/lib/libglib-2.0.so.0
      #33 0xb7a9460e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
      #34 0x08a9f3fc in QEventDispatcherGlib::processEvents (this=0x8fd1808, flags=...) at kernel/qeventdispatcher_glib.cpp:422
      #35 0x082885e8 in QGuiEventDispatcherGlib::processEvents (this=0x8fd1808, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
      #36 0x08a740bd in QEventLoop::processEvents (this=0xbffff04c, flags=...) at kernel/qeventloop.cpp:149
      #37 0x08a74201 in QEventLoop::exec (this=0xbffff04c, flags=...) at kernel/qeventloop.cpp:201
      #38 0x08a768b0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
      #39 0x081d7cd4 in QApplication::exec () at kernel/qapplication.cpp:3736
      #40 0x08193723 in main (argc=2, argv=0xbffff334) at src/main.cpp:111
      

      Attachments

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

        Activity

          People

            tommyd Thomas Keller
            tommyd Thomas Keller
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes