Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-50385

ComboBox crashes on click after model change in QQuickListViewPrivate::lastPosition()

    XMLWordPrintable

Details

    • 29a75074abcd452185e82623cf927d9be6a4d1b8

    Description

      To reproduce:
      1. Run test program.
      2. Do not click on combobox.
      3. Click on "Change model" button.
      4. Click on combobox.
      5. The program should crash.

      Test program:

      import QtQuick 2.5
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          ComboBox {
              id: comboBox
      
              anchors.centerIn: parent
              model: [
                  "111",
                  "222",
                  "333"
              ]
          }
      
          Button {
              anchors.bottom: parent.bottom
              anchors.horizontalCenter: parent.horizontalCenter
              text: "Change Model"
              onClicked: comboBox.model = [ "444", "555", "666" ]
          }
      }
      

      Stack trace:

      1	QQuickListViewPrivate::lastPosition	qquicklistview.cpp	437	0x7ffff7b1cfc9	
      2	QQuickItemViewPrivate::endPosition	qquickitemview.cpp	1570	0x7ffff7b8020a	
      3	QQuickItemViewPrivate::updateViewport	qquickitemview.cpp	1834	0x7ffff7b8156a	
      4	QQuickItemViewPrivate::layout	qquickitemview.cpp	1901	0x7ffff7b81b1c	
      5	QQuickItemView::updatePolish	qquickitemview.cpp	1472	0x7ffff7b7f6f2	
      6	QQuickWindowPrivate::polishItems	qquickwindow.cpp	263	0x7ffff7a666cd	
      7	QSGGuiThreadRenderLoop::renderWindow	qsgrenderloop.cpp	381	0x7ffff7a2a04c	
      8	QSGGuiThreadRenderLoop::event	qsgrenderloop.cpp	493	0x7ffff7a2a881	
      9	QCoreApplicationPrivate::notify_helper	qcoreapplication.cpp	1147	0x7ffff67870e4	
      10	doNotify	qcoreapplication.cpp	1088	0x7ffff6786d67	
      11	QCoreApplication::notify	qcoreapplication.cpp	1074	0x7ffff6786cda	
      12	QGuiApplication::notify	qguiapplication.cpp	1602	0x7ffff71f7850	
      13	QCoreApplication::notifyInternal2	qcoreapplication.cpp	1013	0x7ffff6786c6a	
      14	QCoreApplication::sendEvent	qcoreapplication.h	227	0x7ffff678aca0	
      15	QTimerInfoList::activateTimers	qtimerinfo_unix.cpp	637	0x7ffff67fe6bc	
      16	timerSourceDispatch	qeventdispatcher_glib.cpp	176	0x7ffff67ff9da	
      17	g_main_context_dispatch			0x7ffff39f1267	
      18	g_main_context_iterate.isra			0x7ffff39f1498	
      19	g_main_context_iteration			0x7ffff39f153c	
      20	QEventDispatcherGlib::processEvents	qeventdispatcher_glib.cpp	417	0x7ffff68003a7	
      21	QPAEventDispatcherGlib::processEvents	qeventdispatcher_glib.cpp	115	0x7fffe794f2f2	
      22	QEventLoop::processEvents	qeventloop.cpp	128	0x7ffff6783558	
      23	QEventLoop::exec	qeventloop.cpp	204	0x7ffff6783854	
      24	QCoreApplication::exec	qcoreapplication.cpp	1283	0x7ffff67873b4	
      25	QGuiApplication::exec	qguiapplication.cpp	1593	0x7ffff71f7800	
      26	main	main.cpp	13	0x400f05	
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            krnekit Nikita Krupenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes