Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.11.1
-
None
-
Windows 10
Qt 5.11.1
MSVC 2015 x64
Description
In Qt 5.11.1, using QtQuick.Controls 2.4, a ComboBox will crash the program loading it at startup if created this way:
ComboBox { id: box model: [ "Banana", "Apple", "Coconut" ] }
A ComboBox will crash at startup if created this way:
ComboBox { id: box model: ListModel { ListElement{ text: "Banana" } ListElement{ text: "Apple" } ListElement{ text: "Coconut" } } }
A ComboBox will crash when clicked if created this way:
ComboBox { id: box property var myListModel: ListModel {} model: myListModel Component.onCompleted: { myListModel.append({rName: "Banana"}) myListModel.append({rName: "Apple"}) myListModel.append({rName: "Coconut"}) } }
All examples above were working fine in Qt 5.10 and QtQuick.Controls 2.3. (Note that QtQuick.Controls 2.3 produce the same crashes in Qt 5.11.1).
Not adding any item to the ListModel do not cause any crash on click, but is not a workaround obviously.
Qml executed using the following C++ function and a Window item parent for the ConboBox:
myQQmlApplicationEngine->load(QUrl(qmlFilePath));
Stack trace for startup crash :
1 QQuickItemPrivate::handlePointerEvent Qt5Quick 0x7ffaed93d07f 2 QQuickItemPrivate::dirty Qt5Quick 0x7ffaed93b9f3 3 QQuickItem::setPosition Qt5Quick 0x7ffaed94a4df 4 QQuickControlPrivate::resizeContent Qt5QuickTemplates2 0x7ffb107075fd 5 QQuickControl::geometryChanged Qt5QuickTemplates2 0x7ffb1070644b 6 QQuickItem::setImplicitWidth Qt5Quick 0x7ffaed94968c 7 QQmlPropertyPrivate::writeEnumProperty Qt5Qml 0x7ffb102b4449 8 QQmlBinding::update Qt5Qml 0x7ffb1031596b 9 QQmlBinding::dependencies Qt5Qml 0x7ffb10313d79 10 QQmlBinding::update Qt5Qml 0x7ffb103155e5 11 QQmlBinding::setEnabled Qt5Qml 0x7ffb10314971 12 QQmlObjectCreator::finalize Qt5Qml 0x7ffb1031e688 13 QQmlEnginePrivate::incubate Qt5Qml 0x7ffb102b9fb9 14 QQmlEnginePrivate::incubate Qt5Qml 0x7ffb102b9ae5 15 QQmlDelegateModel::object Qt5Qml 0x7ffb1035d71c 16 QQuickComboBox::textAt Qt5QuickTemplates2 0x7ffb107026cd 17 QQuickComboBox::trUtf8 Qt5QuickTemplates2 0x7ffb107029ea 18 QQuickComboBox::componentComplete Qt5QuickTemplates2 0x7ffb106fec32 19 QQmlObjectCreator::finalize Qt5Qml 0x7ffb1031e79d 20 QQmlComponentPrivate::complete Qt5Qml 0x7ffb102b6106 21 QQmlComponentPrivate::completeCreate Qt5Qml 0x7ffb102b61c9 22 QQmlComponent::create Qt5Qml 0x7ffb102b662e 23 QQmlApplicationEnginePrivate::finishLoad Qt5Qml 0x7ffb10316b39 24 QQmlApplicationEnginePrivate::startLoad Qt5Qml 0x7ffb1031762c 25 QQmlApplicationEngine::load Qt5Qml 0x7ffb1031700d 26 main main.cpp 476 0x7ff73f72d6d0 27 WinMain qtmain_win.cpp 104 0x7ff73f731054 28 __scrt_common_main_seh exe_common.inl 253 0x7ff73f72fd2b 29 BaseThreadInitThunk KERNEL32 0x7ffb4b2e2784 30 RtlUserThreadStart ntdll 0x7ffb4b930c31
Stack trace for click crash :
1 QQuickItemPrivate::handlePointerEvent Qt5Quick 0x7ffaed93d07f 2 QQuickItemPrivate::dirty Qt5Quick 0x7ffaed93b9f3 3 QQuickItem::setPosition Qt5Quick 0x7ffaed94a4df 4 QQuickControlPrivate::resizeContent Qt5QuickTemplates2 0x7ffb168075fd 5 QQuickControl::geometryChanged Qt5QuickTemplates2 0x7ffb1680644b 6 QQuickItem::setImplicitHeight Qt5Quick 0x7ffaed949149 7 QQmlPropertyPrivate::writeEnumProperty Qt5Qml 0x7ffb102b4449 8 QQmlBinding::update Qt5Qml 0x7ffb1031596b 9 QQmlBinding::dependencies Qt5Qml 0x7ffb10313d79 10 QQmlBinding::update Qt5Qml 0x7ffb103155e5 11 QQmlBinding::setEnabled Qt5Qml 0x7ffb10314971 12 QQmlObjectCreator::finalize Qt5Qml 0x7ffb1031e688 13 QQmlEnginePrivate::incubate Qt5Qml 0x7ffb102b9fb9 14 QQmlEnginePrivate::incubate Qt5Qml 0x7ffb102b9ae5 15 QQmlDelegateModel::object Qt5Qml 0x7ffb1035d71c 16 QQuickItemView::countChanged Qt5Quick 0x7ffaeda0631b 17 QQuickListView::~QQuickListView Qt5Quick 0x7ffaeda10df3 18 QQuickItemViewAttached::qt_static_metacall Qt5Quick 0x7ffaeda0ab6c 19 QQuickItemView::componentComplete Qt5Quick 0x7ffaeda05e3b 20 QQmlObjectCreator::finalize Qt5Qml 0x7ffb1031e79d 21 QQmlComponentPrivate::complete Qt5Qml 0x7ffb102b6106 22 QQmlComponentPrivate::completeDeferred Qt5Qml 0x7ffb102b628b 23 QQuickControl::wheelEvent Qt5QuickTemplates2 0x7ffb16809f3d 24 QQuickPopup::z Qt5QuickTemplates2 0x7ffb1682489f 25 QQuickControl::componentComplete Qt5QuickTemplates2 0x7ffb16805f7d 26 QQmlObjectCreator::finalize Qt5Qml 0x7ffb1031e79d 27 QQmlComponentPrivate::complete Qt5Qml 0x7ffb102b6106 28 QQmlComponentPrivate::completeDeferred Qt5Qml 0x7ffb102b628b 29 QQuickControl::wheelEvent Qt5QuickTemplates2 0x7ffb16809f3d 30 QQuickComboBox::setValidator Qt5QuickTemplates2 0x7ffb168022a2 31 QQuickComboBox::focusOutEvent Qt5QuickTemplates2 0x7ffb167fff47 32 QQuickControl::mouseReleaseEvent Qt5QuickTemplates2 0x7ffb16806f4e 33 QQuickItem::event Qt5Quick 0x7ffaed93c62f 34 QApplicationPrivate::notify_helper Qt5Widgets 0x7ffaf9108cc0 35 QApplication::notify Qt5Widgets 0x7ffaf9107b47 36 QCoreApplication::notifyInternal2 Qt5Core 0x7ffaeddaec79 37 QQuickWindowPrivate::deliverMouseEvent Qt5Quick 0x7ffaed9559a8 38 QQuickWindowPrivate::deliverPointerEvent Qt5Quick 0x7ffaed9560b4 39 QQuickWindowPrivate::handleMouseEvent Qt5Quick 0x7ffaed959cd1 40 QWindow::event Qt5Gui 0x7ffaee1f47ca 41 QApplicationPrivate::notify_helper Qt5Widgets 0x7ffaf9108cc0 42 QApplication::notify Qt5Widgets 0x7ffaf9107b47 43 QCoreApplication::notifyInternal2 Qt5Core 0x7ffaeddaec79 44 QGuiApplicationPrivate::processMouseEvent Qt5Gui 0x7ffaee1eddc1 45 QWindowSystemInterface::sendWindowSystemEvents Qt5Gui 0x7ffaee1d48fb 46 QEventDispatcherWin32::processEvents Qt5Core 0x7ffaeddf85c5 47 CallWindowProcW USER32 0x7ffb495cbc50 48 DispatchMessageW USER32 0x7ffb495cb5cf 49 QEventDispatcherWin32::processEvents Qt5Core 0x7ffaeddf7d96 50 qt_plugin_query_metadata qwindows 0x7ffafb1e9979 51 QEventLoop::exec Qt5Core 0x7ffaeddaab23 52 QCoreApplication::exec Qt5Core 0x7ffaeddad8d4 53 main main.cpp 514 0x7ff73f72dbe0 54 WinMain qtmain_win.cpp 104 0x7ff73f731054 55 __scrt_common_main_seh exe_common.inl 253 0x7ff73f72fd2b 56 BaseThreadInitThunk KERNEL32 0x7ffb4b2e2784 57 RtlUserThreadStart ntdll 0x7ffb4b930c31