Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.6.2, 5.8.0
Description
Crash happens on binding update caused by replacing the binding target with another item.
Assume there are 2 items:
- Item1 has a signal SomeMethod.
- Item2 has a function SomeMethod.
Assume next sequence:
1. Loader has source set to Item1.
2. Connection to loader.item is created.
3. Replace loader source with Item2.
4. Application crashes.
See attached QML test case.
The issue is reproducible for Qt 5.6.2 and 5.8.0. It is not reproducible for 5.9.1.
So if it already was fixed it would be good to apply the fix to 5.6 branch.
Crash stack in this case looks like this:
1 QQmlPropertyRawData::isCloned qqmlpropertycache_p.h 2 QQmlPropertyCache::originalClone qqmlpropertycache.cpp 3 QQmlBoundSignal::QQmlBoundSignal qqmlboundsignal.cpp 4 QQmlConnections::connectSignals qqmlconnections.cpp 5 QQmlConnections::setTarget qqmlconnections.cpp 6 QQmlConnections::qt_static_metacall moc_qqmlconnections_p.cpp 7 QQmlConnections::qt_metacall moc_qqmlconnections_p.cpp 8 QMetaObject::metacall qmetaobject.cpp 9 QQmlPropertyPrivate::write qqmlproperty.cpp 10 QQmlPropertyPrivate::writeValueProperty qqmlproperty.cpp 11 QQmlBinding::write qqmlbinding.cpp 12 QQmlBinding::update qqmlbinding.cpp 13 QQmlBinding::expressionChanged qqmlbinding.cpp 14 QQmlJavaScriptExpressionGuard_callback qqmljavascriptexpression.cpp 15 QQmlNotifier::emitNotify qqmlnotifier.cpp 16 QQmlData::signalEmitted qqmlengine.cpp 17 QMetaObject::activate qobject.cpp 18 QMetaObject::activate qobject.cpp 19 QQuickLoader::itemChanged moc_qquickloader_p.cpp 20 QQuickLoaderPrivate::incubatorStateChanged qquickloader.cpp 21 QQuickLoaderIncubator::statusChanged qquickloader.cpp 22 QQmlIncubatorPrivate::changeStatus qqmlincubator.cpp 23 QQmlIncubatorPrivate::incubate qqmlincubator.cpp 24 QQmlEnginePrivate::incubate qqmlincubator.cpp 25 QQmlComponent::create qqmlcomponent.cpp 26 QQuickLoaderPrivate::_q_sourceLoaded qquickloader.cpp 27 QQuickLoaderPrivate::load qquickloader.cpp 28 QQuickLoader::loadFromSourceComponent qquickloader.cpp 29 QQuickLoader::setSourceComponent qquickloader.cpp 30 QQuickLoader::qt_static_metacall moc_qquickloader_p.cpp 31 QQuickLoader::qt_metacall moc_qquickloader_p.cpp 32 QMetaObject::metacall qmetaobject.cpp 33 QQmlPropertyPrivate::write qqmlproperty.cpp 34 QV4::QObjectWrapper::setProperty qv4qobjectwrapper.cpp 35 QV4::QObjectWrapper::setQmlProperty qv4qobjectwrapper.cpp 36 QV4::QObjectWrapper::put qv4qobjectwrapper.cpp 37 QV4::Object::put qv4object_p.h 38 QV4::Runtime::setProperty qv4runtime.cpp 39 QV4::Moth::VME::run qv4vme_moth.cpp 40 QV4::Moth::VME::exec qv4vme_moth.cpp 41 QV4::ScriptFunction::call qv4functionobject.cpp 42 QV4::Object::call qv4object_p.h 43 QQmlJavaScriptExpression::evaluate qqmljavascriptexpression.cpp 44 QQmlBoundSignalExpression::evaluate qqmlboundsignal.cpp 45 QQmlBoundSignal_callback qqmlboundsignal.cpp 46 QQmlNotifier::emitNotify qqmlnotifier.cpp 47 QQmlData::signalEmitted qqmlengine.cpp 48 QMetaObject::activate qobject.cpp 49 QMetaObject::activate qobject.cpp 50 QQuickMouseArea::clicked moc_qquickmousearea_p.cpp 51 QQuickMouseArea::setPressed qquickmousearea.cpp 52 QQuickMouseArea::mouseReleaseEvent qquickmousearea.cpp 53 QQuickItem::event qquickitem.cpp 54 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 55 doNotify qcoreapplication.cpp 56 QCoreApplication::notify qcoreapplication.cpp 57 QGuiApplication::notify qguiapplication.cpp 58 QCoreApplication::notifyInternal2 qcoreapplication.cpp 59 QCoreApplication::sendEvent qcoreapplication.h 60 QQuickWindow::sendEvent qquickwindow.cpp 61 QQuickWindowPrivate::deliverMouseEvent qquickwindow.cpp 62 QQuickWindow::mouseReleaseEvent qquickwindow.cpp 63 QWindow::event qwindow.cpp 64 QQuickWindow::event qquickwindow.cpp 65 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 66 doNotify qcoreapplication.cpp 67 QCoreApplication::notify qcoreapplication.cpp 68 QGuiApplication::notify qguiapplication.cpp 69 QCoreApplication::notifyInternal2 qcoreapplication.cpp 70 QCoreApplication::sendSpontaneousEvent qcoreapplication.h 71 QGuiApplicationPrivate::processMouseEvent qguiapplication.cpp 72 QGuiApplicationPrivate::processWindowSystemEvent qguiapplication.cpp 73 QWindowSystemInterface::sendWindowSystemEvents qwindowsysteminterface.cpp 74 userEventSourceDispatch qeventdispatcher_glib.cpp 75 g_main_context_dispatch 76 ?? 77 g_main_context_iteration 78 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 79 QPAEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 80 QEventLoop::processEvents qeventloop.cpp 81 QEventLoop::exec qeventloop.cpp 82 QCoreApplication::exec qcoreapplication.cpp 83 QGuiApplication::exec qguiapplication.cpp 84 main main.cpp
Attachments
Issue Links
- is duplicated by
-
QTBUG-56551 Broken code crashes the qml engine
- Closed