Details
Description
My iOS app after upgrading to 5.9.0 crashes in QQuickWindow::mouseGrabberItem() which is called from QQmlApplicationEngine's destructor:
Crashed: com.apple.main-thread 0 MyApplication 0x100b1007c QQuickWindow::mouseGrabberItem() const + 7862900 1 MyApplication 0x100b10078 QQuickWindow::mouseGrabberItem() const + 7862896 2 MyApplication 0x100b119ac QQuickWindowPrivate::removeGrabber(QQuickItem*, bool, bool) + 7869348 3 MyApplication 0x100af671c QQuickItemPrivate::derefWindow() + 7758100 4 MyApplication 0x100af5c30 QQuickItem::~QQuickItem() + 7755304 5 MyApplication 0x100b3accc QQmlPrivate::QQmlElement<QQuickImage>::~QQmlElement() + 8038084 6 MyApplication 0x10131a2c8 QObjectPrivate::deleteChildren() + 16293056 7 MyApplication 0x10131a080 QObject::~QObject() + 16292472 8 MyApplication 0x100b10078 QQuickWindow::mouseGrabberItem() const + 7862896 9 MyApplication 0x1009c7fbc QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() + 6519220 10 MyApplication 0x10131a2c8 QObjectPrivate::deleteChildren() + 16293056 11 MyApplication 0x10131a080 QObject::~QObject() + 16292472 12 MyApplication 0x100b10078 QQuickWindow::mouseGrabberItem() const + 7862896 13 MyApplication 0x100b3b5f4 QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement() + 8040428 14 MyApplication 0x10131a2c8 QObjectPrivate::deleteChildren() + 16293056 15 MyApplication 0x10131a080 QObject::~QObject() + 16292472 16 MyApplication 0x100b10078 QQuickWindow::mouseGrabberItem() const + 7862896 17 MyApplication 0x1009be0f0 QQmlPrivate::QQmlElement<QQuickApplicationWindow>::~QQmlElement() + 6478568 18 MyApplication 0x10107d554 QQmlApplicationEnginePrivate::cleanUp() + 13553484 19 MyApplication 0x10107e3d0 QQmlApplicationEngine::~QQmlApplicationEngine() + 13557192 20 MyApplication 0x10010da50 MyApplication::~MyApplication() (myapplication.cpp:59) 21 MyApplication 0x1000bb968 main (main.cpp:23) 22 MyApplication 0x1005d3694 user_main_trampoline() + 2371724 23 MyApplication 0x1005d3530 +[QIOSApplicationStateTracker applicationDidFinishLaunching] + 2371368 24 CoreFoundation 0x19081f518 -[_CFXNotificationNameWildcardObjectRegistration find:matching:] + 668 25 CoreFoundation 0x1907c37a8 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1412 26 CoreFoundation 0x19069895c _CFXNotificationPost + 376 27 Foundation 0x1911aa930 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68 28 UIKit 0x196976ca8 -[UIApplication _terminateWithStatus:] + 300 29 UIKit 0x196b751a0 __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke.2093 + 792 30 UIKit 0x196b78950 _runAfterCACommitDeferredBlocks + 292 31 UIKit 0x196b6a9ec _cleanUpAfterCAFlushAndRunDeferredBlocks + 528 32 UIKit 0x1968de648 _afterCACommitHandler + 132 33 CoreFoundation 0x1907689a8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 34 CoreFoundation 0x190766630 __CFRunLoopDoObservers + 372 35 CoreFoundation 0x190766a7c __CFRunLoopRun + 956 36 CoreFoundation 0x190696da4 CFRunLoopRunSpecific + 424 37 GraphicsServices 0x192100074 GSEventRunModal + 100 38 UIKit 0x196951058 UIApplicationMain + 208 39 MyApplication 0x1005d329c qt_main_wrapper + 2370708 40 libdyld.dylib 0x18f6a559c start + 4
In this stacktrace above my code is only main.cpp (line 23 is "return myApplication.exec();") and myapplication.cpp line 59 - destructor of QGuiApplication's subclass call - "delete mQmlApplicationEngine;" which is created on heap in constructor.