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

5.3.x regression — crash when asynchronous loader finishes loading if nested repeater model was modified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P0: Blocker
    • 5.3.2
    • 5.3.1
    • None
    • Qt 5.3.1, Windows 8.1, Visual Studio 2013.2, 32-bit
      Qt 5.3.0 Linux Mint 16, GCC 4.8.1, 64 bit
    • 8ef1e1e7a4107f96a526c19bbe25ed6f1654e7ea

    Description

      The attached QML file is crashing for me on Qt 5.3.1.

      I have two repeaters, one nested in the another, both using the same model. They live within an asynchronous Loader. Loader is nested within another Repeater, with model set initially to 0.

      The Timer sequentially increments model property of the outmost Repeater (the one with Loader) and inserts a new item into the model used by the inner Repeaters.

      When the Loader finished loading, the crash occurs. It may take a while, as control instantiation is slow. [Yet, when using the lesser amount of controls it doesn't crash that well.]

      Crash is not deterministic, it happens with 80–90% accuracy. Depending on your configuration, other value of Timer interval or the count of ListModel elements might be needed to observe the issue.

      I have confirmed the crash both on Windows 8.1 and Linux Mint 16 with Qt 5.3.1. When testing the same code with Qt 5.2.1, it works properly (no crashes).

      As a side note, you might observe that controls are "jumping" up and down during the instantiation. It was not the case with Qt 5.2.1.

      This issue is likely related to QTBUG-40201, perhaps even a duplicate.
      Still, I decided to file a separate issue, because of a:
      a) different way to trigger crash (inserting elements into model)
      b) different stacktraces

      Stacktrace (Qt 5.3.1 release)

      >	Qt5Core.dll!QtSharedPointer::ExternalRefCountData::getAndRef(const QObject * obj) Line 1250	C++
       	Qt5Qml.dll!QQmlVMEGuard::guard(QQmlObjectCreator * creator) Line 120	C++
       	Qt5Qml.dll!QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt & i) Line 389	C++
       	Qt5Qml.dll!QQmlIncubatorPrivate::incubate(QQmlInstantiationInterrupt & i) Line 376	C++
       	Qt5Qml.dll!QQmlIncubationController::incubateFor(int msecs) Line 405	C++
       	Qt5Quick.dll!QQuickWindowIncubationController::incubate() Line 136	C++
       	Qt5Quick.dll!QQuickWindowIncubationController::timerEvent(QTimerEvent * __formal) Line 118	C++
       	Qt5Core.dll!QObject::event(QEvent * e) Line 1268	C++
       	Qt5Core.dll!QCoreApplicationPrivate::notify_helper(QObject * receiver, QEvent * event) Line 1052	C++
       	Qt5Gui.dll!QGuiApplication::notify(QObject * object, QEvent * event) Line 1471	C++
       	Qt5Core.dll!QCoreApplication::notifyInternal(QObject * receiver, QEvent * event) Line 935	C++
       	Qt5Core.dll!QEventDispatcherWin32Private::sendTimerEvent(int timerId) Line 588	C++
       	Qt5Core.dll!QEventDispatcherWin32::event(QEvent * e) Line 1137	C++
       	Qt5Core.dll!QCoreApplicationPrivate::notify_helper(QObject * receiver, QEvent * event) Line 1052	C++
       	Qt5Gui.dll!QGuiApplication::notify(QObject * object, QEvent * event) Line 1471	C++
       	Qt5Core.dll!QCoreApplication::notifyInternal(QObject * receiver, QEvent * event) Line 935	C++
       	Qt5Core.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1539	C++
       	Qt5Core.dll!QCoreApplication::sendPostedEvents(QObject * receiver, int event_type) Line 1397	C++
       	qwindows.dll!QWindowsGuiEventDispatcher::sendPostedEvents() Line 89	C++
       	Qt5Core.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned int wp, long lp) Line 423	C++
       	user32.dll!__InternalCallWinProc@20()	Unknown
       	user32.dll!UserCallWinProcCheckWow()	Unknown
       	user32.dll!DispatchMessageWorker()	Unknown
       	user32.dll!_DispatchMessageW@4()	Unknown
       	Qt5Core.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 764	C++
       	qwindows.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 81	C++
       	Qt5Core.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags) Line 211	C++
       	Qt5Core.dll!QCoreApplication::exec() Line 1188	C++
       	QmlLauncher.exe!main(int argc, char * * argv) Line 197	C++
       	QmlLauncher.exe!__tmainCRTStartup() Line 626	C
       	kernel32.dll!@BaseThreadInitThunk@12()	Unknown
       	ntdll.dll!__RtlUserThreadStart()	Unknown
       	ntdll.dll!__RtlUserThreadStart@8()	Unknown
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-40437
          # Subject Branch Project Status CR V

          Activity

            People

              laknoll Lars Knoll
              mwu Michał Urbańczyk
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes