Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.2.1
-
qtdeclarative: cb7e8dabf6e5b323bd3f2511127f63bee732fd99
Description
Crash happens when combobox model contains more than one item and it's located outside the listview. Example below explains the issue.
crash: ASSERT failure in QVector<T>::insert: "index out of range"
Bug is fixed to Qt 5.3.0 beta. Assumed it's vanished because of new QML compiler.
import QtQuick 2.2 import QtQuick.Layouts 1.1 import QtQuick.Controls 1.1 ApplicationWindow { title: qsTr("Hello World") width: 200 height: 59 // CRASH if height < combobox model count * combobox height // height: 60 // NO CRASH ListView { anchors.fill: parent model: ["aa","bb","cc","dd"] delegate: ComboBox { height: 20 model: ["AA","BB"] // CRASH if window height < 60 // model: ["AA"] // no CRASH at all } } }
Workaround is to initialize combobox with empty model and add items after first paint.