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

Crash on QFileSystemModel when used with QProxyModel

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.6.0
    • Core: Item Models
    • None
    • Windows 7
      MS VS2015

    Description

      Created a QFileSystemModel.
      Connected a QIdentityProxyModel subclass to it.
      Connected a second QIdentityProxyModel subclass to the first one.
      Connected a QTreeView to the second proxy model.
      Created a new folder in the root folder of the QFileSystemModel.
      Renamed that new folder.

      -> Crash with
      Qt: ASSERT: "srcPersistentIndex.isValid()" in file itemmodels\qidentityproxymodel.cpp, line 497 (global\qglobal.cpp:2994, void __cdecl qt_assert(const char *,const char *,int) noexcept)

      From the callstack below you can see that only Qt code is involved.
      From my previous tests on linux I came to the conclusion that there must be something wrong with internal QPersistentModelIndexes held by QProxyModel when combined with a QFileSystemModel.

      ucrtbased.dll!__threadid() Unbekannt
      ucrtbased.dll!__acrt_report_runtime_error() Unbekannt
      ucrtbased.dll!abort() Unbekannt
      ucrtbased.dll!terminate() Unbekannt
      vcruntime140d.dll!FindHandler(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, const _s_FuncInfo * pFuncInfo, unsigned char recursive, int CatchDepth, unsigned __int64 * pMarkerRN) Zeile 750 C++
      vcruntime140d.dll!__InternalCxxFrameHandler(EHExceptionRecord * pExcept, unsigned __int64 * pRN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC, const _s_FuncInfo * pFuncInfo, int CatchDepth, unsigned __int64 * pMarkerRN, unsigned char recursive) Zeile 449 C++
      vcruntime140d.dll!__CxxFrameHandler(EHExceptionRecord * pExcept, unsigned __int64 RN, _CONTEXT * pContext, _xDISPATCHER_CONTEXT * pDC) Zeile 213 C++
      ntdll.dll!00000000771cbf9d() Unbekannt
      ntdll.dll!00000000771a04ca() Unbekannt
      ntdll.dll!00000000771a3c1f() Unbekannt
      KernelBase.dll!000007fefce7a06d() Unbekannt
      vcruntime140d.dll!CxxThrowException(void * pExceptionObject, const _s_ThrowInfo * pThrowInfo) Zeile 136 C++
      gen4-main.exe!gen4::sdk::qtToLoggingMessageHandler(QtMsgType type, const QMessageLogContext & context, const QString & msg) Zeile 161 C++
      Qt5Cored.dll!qt_message_print(QtMsgType msgType, const QMessageLogContext & context, const QString & message) Zeile 1576 C++
      Qt5Cored.dll!qt_message(QtMsgType msgType, const QMessageLogContext & context, const char * msg, char * ap) Zeile 270 C++
      Qt5Cored.dll!QMessageLogger::fatal(const char * msg, ...) Zeile 781 C++
      Qt5Cored.dll!qt_assert(const char * assertion, const char * file, int line) Zeile 2994 C++
      Qt5Cored.dll!QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> & sourceParents, QAbstractItemModel::LayoutChangeHint hint) Zeile 497 C++
      Qt5Cored.dll!QIdentityProxyModel::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Zeile 162 C++
      Qt5Cored.dll!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Zeile 3732 C++
      Qt5Cored.dll!QMetaObject::activate(QObject * sender, const QMetaObject * m, int local_signal_index, void * * argv) Zeile 3596 C++
      Qt5Cored.dll!QAbstractItemModel::layoutAboutToBeChanged(const QList<QPersistentModelIndex> & _t1, QAbstractItemModel::LayoutChangeHint _t2) Zeile 588 C++
      Qt5Cored.dll!QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> & sourceParents, QAbstractItemModel::LayoutChangeHint hint) Zeile 513 C++
      Qt5Cored.dll!QIdentityProxyModel::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Zeile 162 C++
      Qt5Cored.dll!QMetaObject::activate(QObject * sender, int signalOffset, int local_signal_index, void * * argv) Zeile 3732 C++
      Qt5Cored.dll!QMetaObject::activate(QObject * sender, const QMetaObject * m, int local_signal_index, void * * argv) Zeile 3596 C++
      Qt5Cored.dll!QAbstractItemModel::layoutAboutToBeChanged(const QList<QPersistentModelIndex> & _t1, QAbstractItemModel::LayoutChangeHint _t2) Zeile 588 C++
      Qt5Widgetsd.dll!QFileSystemModel::sort(int column, Qt::SortOrder order) Zeile 1112 C++
      Qt5Widgetsd.dll!QFileSystemModelPrivate::_q_performDelayedSort() Zeile 982 C++
      Qt5Widgetsd.dll!QFileSystemModel::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Zeile 120 C++
      Qt5Cored.dll!QMetaCallEvent::placeMetaCall(QObject * object) Zeile 496 C++
      Qt5Cored.dll!QObject::event(QEvent * e) Zeile 1256 C++
      > Qt5Widgetsd.dll!QFileSystemModel::event(QEvent * event) Zeile 1606 C++
      Qt5Widgetsd.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Zeile 3714 C++
      Qt5Widgetsd.dll!QApplication::notify(QObject * receiver, QEvent * e) Zeile 3157 C++
      gen4-main.exe!gen4::sdk::Gen4Application<QApplication>::notify(QObject * receiver, QEvent * event) Zeile 77 C++
      Qt5Cored.dll!QCoreApplication::notifyInternal2(QObject * receiver, QEvent * event) Zeile 1015 C++
      Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event) Zeile 227 C++
      Qt5Cored.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Zeile 1650 C++
      Qt5Cored.dll!QEventDispatcherWin32::sendPostedEvents() Zeile 1265 C++
      qwindowsd.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Zeile 76 C++
      Qt5Cored.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned __int64 wp, __int64 lp) Zeile 431 C++
      user32.dll!UserCallWinProcCheckWow() Unbekannt
      user32.dll!DispatchMessageWorker() Unbekannt
      Qt5Cored.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Zeile 829 C++
      qwindowsd.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Zeile 68 C++
      Qt5Cored.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Zeile 129 C++
      Qt5Cored.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Zeile 204 C++
      Qt5Cored.dll!QCoreApplication::exec() Zeile 1285 C++
      Qt5Guid.dll!QGuiApplication::exec() Zeile 1599 C++

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            cyril4 Harald Prasser
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes