Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.11.0 Beta 2
Description
When using the Universal or Material style in the Qt Quick Designer and dragging a Combobox into the form I get the following assert:
ucrtbased 0x5cf5eae4 15 qt_message_fatal qlogging.cpp 1828 0x6630ac87 16 QMessageLogger::fatal qlogging.cpp 877 0x663098ad 17 qt_assert qglobal.cpp 3180 0x662fd87e 18 QQuickItemLayer::componentComplete qquickitem.cpp 8157 0xffa8899 19 QQuickItem::componentComplete qquickitem.cpp 4988 0xffa69a6 20 QQmlObjectCreator::finalize qqmlobjectcreator.cpp 1350 0x65a4266e 21 QQmlComponentPrivate::complete qqmlcomponent.cpp 926 0x65998c1c 22 QQmlComponentPrivate::completeDeferred qqmlcomponent.cpp 917 0x65998be3 23 QtQuickPrivate::completeDeferred qquickdeferredexecute.cpp 141 0xc2b3c37 24 quickCompleteDeferred<QQuickItem> qquickdeferredexecute_p_p.h 82 0xc2851e6 25 QQuickPopupItemPrivate::executeBackground qquickpopupitem.cpp 152 0xc2e789f 26 QQuickControl::componentComplete qquickcontrol.cpp 1455 0xc2af5e6 27 QmlDesigner::Internal::QmlPrivateGate::doComponentCompleteRecursive qmlprivategate_56.cpp 262 0x1091c29 28 QmlDesigner::Internal::QmlPrivateGate::doComponentCompleteRecursive qmlprivategate_56.cpp 257 0x1091be5 29 QmlDesigner::Internal::QmlPrivateGate::doComponentCompleteRecursive qmlprivategate_56.cpp 257 0x1091be5 30 QmlDesigner::Internal::ObjectNodeInstance::doComponentComplete objectnodeinstance.cpp 928 0x106347e 31 QmlDesigner::Internal::QuickItemNodeInstance::doComponentComplete quickitemnodeinstance.cpp 196 0x103e0a0 32 QmlDesigner::ServerNodeInstance::doComponentComplete servernodeinstance.cpp 595 0x106a864 33 QmlDesigner::NodeInstanceServer::completeComponent nodeinstanceserver.cpp 403 0x1045e34 34 QmlDesigner::NodeInstanceClientProxy::completeComponent nodeinstanceclientproxy.cpp 390 0x101cb15 35 QmlDesigner::NodeInstanceClientProxy::dispatchCommand nodeinstanceclientproxy.cpp 469 0x101c6c6 36 QmlDesigner::NodeInstanceClientProxy::readDataStream nodeinstanceclientproxy.cpp 309 0x101d074 37 QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__thiscall QmlDesigner::NodeInstanceClientProxy:: *)(void)>::call qobjectdefs_impl.h 134 0x102954d 38 QtPrivate::FunctionPointer<void (__thiscall QmlDesigner::NodeInstanceClientProxy:: *)(void)>::call<QtPrivate::List<>,void> qobjectdefs_impl.h 167 0x101e4e8 39 QtPrivate::QSlotObject<void (__thiscall QmlDesigner::NodeInstanceClientProxy:: *)(void),QtPrivate::List<>,void>::impl qobjectdefs_impl.h 396 0x102ae25 40 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 376 0x665ac86f 41 QMetaObject::activate qobject.cpp 3757 0x665e02b1 42 QMetaObject::activate qobject.cpp 3631 0x665dfdc1 43 QIODevice::readyRead moc_qiodevice.cpp 185 0x6649dc59 44 QIODevice::qt_static_metacall moc_qiodevice.cpp 91 0x6649b638 45 QMetaObject::activate qobject.cpp 3769 0x665e038c 46 QMetaObject::activate qobject.cpp 3631 0x665dfdc1 47 QWindowsPipeReader::readyRead moc_qwindowspipereader_p.cpp 166 0x666dafe9 48 QWindowsPipeReader::emitPendingReadyRead qwindowspipereader.cpp 308 0x66527078 49 QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,void (__thiscall QWindowsPipeReader:: *)(void)>::call qobjectdefs_impl.h 134 0x6652767a 50 QtPrivate::FunctionPointer<void (__thiscall QWindowsPipeReader:: *)(void)>::call<QtPrivate::List<>,void> qobjectdefs_impl.h 167 0x66527384 51 QtPrivate::QSlotObject<void (__thiscall QWindowsPipeReader:: *)(void),QtPrivate::List<>,void>::impl qobjectdefs_impl.h 396 0x665276fe 52 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 376 0x665ac86f 53 QMetaCallEvent::placeMetaCall qobject.cpp 502 0x665e7197 54 QObject::event qobject.cpp 1250 0x665e18a6 55 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 1198 0x665991fc 56 doNotify qcoreapplication.cpp 1138 0x6659a5d3 57 QCoreApplication::notify qcoreapplication.cpp 1124 0x66596fa3 58 QGuiApplication::notify qguiapplication.cpp 1739 0x37c4028 59 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1048 0x6659859c 60 QCoreApplication::sendEvent qcoreapplication.h 234 0x665a19f9 61 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1745 0x66599979 62 QEventDispatcherWin32::sendPostedEvents qeventdispatcher_win.cpp 1084 0x666340c4 63 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 82 0x5a6e5f0 64 qt_internal_proc qeventdispatcher_win.cpp 239 0x666326e3 65 AddClipboardFormatListener USER32 0x765be0bb 66 EndTask USER32 0x765c8849 67 EndTask USER32 0x765cb145 68 DispatchMessageW USER32 0x765b90dc 69 DispatchMessageW USER32 0x765b8c20 70 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 630 0x66632e89 71 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 74 0x5a6e5c8 72 QEventLoop::processEvents qeventloop.cpp 137 0x6659383c 73 QEventLoop::exec qeventloop.cpp 214 0x66593a47 74 QCoreApplication::exec qcoreapplication.cpp 1336 0x66596772 75 QGuiApplication::exec qguiapplication.cpp 1730 0x37c3fe8 76 internalMain qml2puppetmain.cpp 128 0x1093eab 77 main qml2puppetmain.cpp 145 0x1093fc9 78 invoke_main exe_common.inl 64 0x1097b7e 79 __scrt_common_main_seh exe_common.inl 253 0x1097a00 80 __scrt_common_main exe_common.inl 296 0x109789d 81 mainCRTStartup exe_main.cpp 17 0x1097b98 82 BaseThreadInitThunk KERNEL32 0x772a8654 83 RtlGetAppContainerNamedObjectPath ntdll 0x77964a77 84 RtlGetAppContainerNamedObjectPath ntdll 0x77964a47
I also get the assert with Qt 5.10.1 but not with Qt 5.10.0
This is most likely related to deferred properties.
With the default error everything seems to work.
See also: QTCREATORBUG-20034 and QTCREATORBUG-20033
https://codereview.qt-project.org/#/c/219430/ does fix the assert, but the background of the Combobox is not rendered anymore. The default style is not affected.
Stack trace for Button which seems to assert in any style.
16 QMessageLogger::fatal qlogging.cpp 877 0x666c98ad 17 qt_assert qglobal.cpp 3180 0x666bd87e 18 QQuickItemLayer::componentComplete qquickitem.cpp 8157 0x10158899 19 QQuickItem::componentComplete qquickitem.cpp 4988 0x101569a6 20 QQmlObjectCreator::finalize qqmlobjectcreator.cpp 1350 0x6540266e 21 QQmlComponentPrivate::complete qqmlcomponent.cpp 926 0x65358c1c 22 QQmlComponentPrivate::completeDeferred qqmlcomponent.cpp 917 0x65358be3 23 QtQuickPrivate::completeDeferred qquickdeferredexecute.cpp 141 0xfcf3c37 24 quickCompleteDeferred<QQuickItem> qquickdeferredexecute_p_p.h 82 0xfcc51e6 25 QQuickControlPrivate::executeBackground qquickcontrol.cpp 697 0xfcf1e2b 26 QQuickControl::componentComplete qquickcontrol.cpp 1455 0xfcef5e6 27 QQuickAbstractButton::componentComplete qquickabstractbutton.cpp 958 0xfcc2839 28 QmlDesigner::Internal::QmlPrivateGate::doComponentCompleteRecursive qmlprivategate_56.cpp 262 0xc01c29 29 QmlDesigner::Internal::ObjectNodeInstance::doComponentComplete objectnodeinstance.cpp 928 0xbd347e 30 QmlDesigner::Internal::QuickItemNodeInstance::doComponentComplete quickitemnodeinstance.cpp 196 0xbae0a0 31 QmlDesigner::ServerNodeInstance::doComponentComplete servernodeinstance.cpp 595 0xbda864 32 QmlDesigner::NodeInstanceServer::completeComponent nodeinstanceserver.cpp 403 0xbb5e34 33 QmlDesigner::Qt5InformationNodeInstanceServer::completeComponent qt5informationnodeinstanceserver.cpp 268 0xba74e4 34 QmlDesigner::NodeInstanceClientProxy::completeComponent nodeinstanceclientproxy.cpp 390 0xb8cb15 35 QmlDesigner::NodeInstanceClientProxy::dispatchCommand nodeinstanceclientproxy.cpp
https://codereview.qt-project.org/#/c/223764/ ensures that the qml2puppet does not read deferred properties before completing the qobject. This is not enough to fix the issue.
But together with https://codereview.qt-project.org/#/c/224070/ the issue seems to be fixed.
The patch https://codereview.qt-project.org/#/c/224070 is required because when finalizing the component creating certain bindings are evaluated that trigger quickBeginDeferred().
To ensure defined behavior we have to avoid calling quickBeginDeferred() while component complete is blocked.