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

Qt crashes when MenuItem changes during hover

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.2.2
    • GUI: Menus
    • Windows

    Description

      Qt crashes when model within Menu changes during hover

      * thread #1, name = 'Main Thread', stop reason = Exception 0xc0000005 encountered at address 0x7ff986e5b0eb: Access violation reading location 0x00000008
        * frame #0: 0x00007ff986e5b0eb Qt6Quickd.dll`QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> >::get(this=0x0000000000000008 {d=???}) at qscopedpointer.h:147
          frame #1: 0x00007ff986e3fed4 Qt6Quickd.dll`qGetPtrHelper<QScopedPointer<QObjectData,QScopedPointerDeleter<QObjectData> > const >(ptr={d=???}) at qglobal.h:1272
          frame #2: 0x00007ff986e5876b Qt6Quickd.dll`QQuickItem::d_func(this=0x0000000000000000 ???) at qquickitem.h:476
          frame #3: 0x00007ff986f0b814 Qt6Quickd.dll`QQuickItem::width(this=0x0000000000000000 ???) at qquickitem.cpp:6881
          frame #4: 0x00007ff9876258bd Qt6Quickd.dll`QQuickListViewPrivate::updateHighlight(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}) at qquicklistview.cpp:1048
          frame #5: 0x00007ff9875faf29 Qt6Quickd.dll`QQuickItemViewPrivate::updateCurrent(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}, modelIndex=0 [0x00000000]) at qquickitemview.cpp:1685
          frame #6: 0x00007ff9875f515c Qt6Quickd.dll`QQuickItemView::createdItem(this=0x000002467b166cd0 {orient=0x00000002, visiblePos=0, averageSize=28, ...}, index=0 [0x00000000], object=0x000002467e926e40 {highlighted=false, arrow={ptr_value=2501791606689 [0x000002467e6667a1]}, menu={...}, ...}) at qquickitemview.cpp:2406
          frame #7: 0x00007ff9875ededf Qt6Quickd.dll`QQuickItemView::qt_static_metacall(_o=0x000002467b166cd0 {orient=0x00000002, visiblePos=0, averageSize=28, ...}, _c=InvokeMetaMethod, _id=34 [0x00000022], _a=0x0000008e21399de8 {0x0000000000000000}) at moc_qquickitemview_p.cpp:504
          frame #8: 0x00007ff997ebfe3a Qt6Cored.dll`doActivate<0>(sender=0x000002467b20cca0 {...}, signal_index=5 [0x00000005], argv=0x0000008e21399de8 {0x0000000000000000}) at qobject.cpp:3920
          frame #9: 0x00007ff997ea81b8 Qt6Cored.dll`QMetaObject::activate(sender=0x000002467b20cca0 {...}, m=0x00007ff9d627deb0 {Qt6QmlModelsd.dll!QMetaObject const QQmlInstanceModel::staticMetaObject} {d={superdata={direct=0x0000000000000000 {d={superdata={direct=???, indirect=???}, stringdata=???, data=???, ...}}, indirect=0x00007ff9d612665e {Qt6QmlModelsd.dll!QMetaObject::staticMetaObject<&QMetaObject const QObject::staticMetaObject>(void)}}, ...}}, local_signal_index=2 [0x00000002], argv=0x0000008e21399de8 {0x0000000000000000}) at qobject.cpp:3968
          frame #10: 0x00007ff9d61697cf Qt6QmlModelsd.dll`QQmlInstanceModel::createdItem(this=0x000002467b20cca0 {...}, _t1=0 [0x00000000], _t2=0x000002467e926e40 {highlighted=false, arrow={ptr_value=2501791606689 [0x000002467e6667a1]}, menu={...}, ...}) at moc_qqmlobjectmodel_p.cpp:267
          frame #11: 0x00007ff9d616a14a Qt6QmlModelsd.dll`QQmlObjectModel::object(this=0x000002467b20cca0 {...}, index=0 [0x00000000], __formal=Synchronous) at qqmlobjectmodel.cpp:285
          frame #12: 0x00007ff9875fa2e0 Qt6Quickd.dll`QQuickItemViewPrivate::createItem(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}, modelIndex=0 [0x00000000], incubationMode=Synchronous) at qquickitemview.cpp:2351
          frame #13: 0x00007ff987626fc0 Qt6Quickd.dll`QQuickListViewPrivate::applyInsertionChange(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}, change={...}, insertResult=0x0000008e2139a3b8 {visiblePos={isNull=false, value=0}, changedFirstItem=false, sizeChangesBeforeVisiblePos=0, ...}, addedItems=0x0000008e2139a518 { size=0 [0x0000000000000000] }, movingIntoView=0x0000008e2139a548 { size=0 [0x0000000000000000] }) at qquicklistview.cpp:3743
          frame #14: 0x00007ff9875fd6f4 Qt6Quickd.dll`QQuickItemViewPrivate::applyModelChanges(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}, totalInsertionResult=0x0000008e2139a858 {visiblePos={isNull=false, value=0}, changedFirstItem=false, sizeChangesBeforeVisiblePos=0, ...}, totalRemovalResult=0x0000008e2139a8a8 {visiblePos={isNull=false, value=0}, changedFirstItem=false, sizeChangesBeforeVisiblePos=0, ...}) at qquickitemview.cpp:2061
          frame #15: 0x00007ff9875f91fc Qt6Quickd.dll`QQuickItemViewPrivate::layout(this=0x000002467b3fd830 {orient=Vertical, visiblePos=0, averageSize=28, ...}) at qquickitemview.cpp:1895
          frame #16: 0x00007ff9875f470d Qt6Quickd.dll`QQuickItemView::updatePolish(this=0x000002467b166cd0 {orient=0x00000002, visiblePos=0, averageSize=28, ...}) at qquickitemview.cpp:1476
          frame #17: 0x00007ff98710b574 Qt6Quickd.dll`QQuickWindowPrivate::polishItems(this=0x000002467b163d80 {complete=true, visible=true, visibility=AutomaticVisibility, ...}) at qquickwindow.cpp:383
          frame #18: 0x00007ff987575e04 Qt6Quickd.dll`QSGThreadedRenderLoop::polishAndSync(this=0x000002467b3d40e0 {sg=0x000002467b289920 {...}, pendingRenderContexts={ size=0 [0x0000000000000000] }, m_animation_driver=0x000002467b1c51a0 {...}, ...}, w=0x000002467b574ca0 {window=0x000002467b022e10 {...}, thread=0x000002467b3fbc50 {wm=0x000002467b3d40e0 {sg=0x000002467b289920 {m_antialiasingMethod=VertexAntialiasing, m_distanceFieldDisabled=false, m_distanceFieldAntialiasing=HighQualitySubPixelAntialiasing, ...}, ...}, ...}, ...}, inExpose=false) at qsgthreadedrenderloop.cpp:1434
          frame #19: 0x00007ff987574a31 Qt6Quickd.dll`QSGThreadedRenderLoop::handleUpdateRequest(this=0x000002467b3d40e0 {sg=0x000002467b289920 {m_antialiasingMethod=VertexAntialiasing, m_distanceFieldDisabled=false, m_distanceFieldAntialiasing=HighQualitySubPixelAntialiasing, ...}, pendingRenderContexts={ size=0 [0x0000000000000000] }, m_animation_driver=0x000002467b1c51a0 {...}, ...}, window=0x000002467b022e10 {...}) at qsgthreadedrenderloop.cpp:1275
          frame #20: 0x00007ff98710849e Qt6Quickd.dll`QQuickWindow::event(this=0x000002467b022e10 {...}, e=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qquickwindow.cpp:1532
          frame #21: 0x00007ff997de6b52 Qt6Cored.dll`QCoreApplicationPrivate::notify_helper(receiver=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qcoreapplication.cpp:1224
          frame #22: 0x00007ff997de9240 Qt6Cored.dll`doNotify(receiver=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qcoreapplication.cpp:1153
          frame #23: 0x00007ff997de3572 Qt6Cored.dll`QCoreApplication::notify(this=0x0000008e2139f6b8 {...}, receiver=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qcoreapplication.cpp:1139
          frame #24: 0x00007ff9880908ff Qt6Guid.dll`QGuiApplication::notify(this=0x0000008e2139f6b8 {...}, object=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qguiapplication.cpp:1928
          frame #25: 0x00007ff997de5447 Qt6Cored.dll`QCoreApplication::notifyInternal2(receiver=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qcoreapplication.cpp:1063
          frame #26: 0x00007ff997de2c6f Qt6Cored.dll`QCoreApplication::sendEvent(receiver=0x000002467b022e10 {...}, event=0x0000008e2139b988 {t=77 [0x004d], m_posted=false, m_spont=false, ...}) at qcoreapplication.cpp:1471
          frame #27: 0x00007ff988132b47 Qt6Guid.dll`QPlatformWindow::deliverUpdateRequest(this=0x000002467b451af0 {m_data={flags={i=134279169 [0x0800f001]}, geometry={ x = 1280 [0x00000500], y = 560 [0x00000230], width = 1280 [0x00000500], height = 960 [0x000003c0] }, fullFrameMargins={m_left=13 [0x0000000d], m_top=58 [0x0000003a], m_right=13 [0x0000000d], ...}, ...}, ...}) at qplatformwindow.cpp:810
          frame #28: 0x00007ff988132439 Qt6Guid.dll`QPlatformWindow::windowEvent(this=0x000002467b451af0 {m_data={flags={i=134279169 [0x0800f001]}, geometry={ x = 1280 [0x00000500], y = 560 [0x00000230], width = 1280 [0x00000500], height = 960 [0x000003c0] }, fullFrameMargins={m_left=13 [0x0000000d], m_top=58 [0x0000003a], m_right=13 [0x0000000d], ...}, ...}, ...}, event=0x0000008e2139bbf8 {id=4 [0x00000004]}) at qplatformwindow.cpp:490
          frame #29: 0x00007ff9ded78c4d qwindowsd.dll`QWindowsWindow::windowEvent(this=0x000002467b451af0 {m_data={flags={i=134279169 [0x0800f001]}, geometry={ x = 1280 [0x00000500], y = 560 [0x00000230], width = 1280 [0x00000500], height = 960 [0x000003c0] }, fullFrameMargins={m_left=13 [0x0000000d], m_top=58 [0x0000003a], m_right=13 [0x0000000d], ...}, ...}, ...}, event=0x0000008e2139bbf8 {t=1 [0x0001], m_posted=false, m_spont=false, ...}) at qwindowswindow.cpp:2480
          frame #30: 0x00007ff98809b10e Qt6Guid.dll`QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(window=0x000002467b022e10 {...}, event=0x0000008e2139bbf8 {id=4 [0x00000004]}) at qguiapplication.cpp:1983
          frame #31: 0x00007ff9880908d5 Qt6Guid.dll`QGuiApplication::notify(this=0x0000008e2139f6b8 {...}, object=0x000002467b022e10 {...}, event=0x0000008e2139bbf8 {id=4 [0x00000004]}) at qguiapplication.cpp:1922
          frame #32: 0x00007ff997de5447 Qt6Cored.dll`QCoreApplication::notifyInternal2(receiver=0x000002467b022e10 {...}, event=0x0000008e2139bbf8 {id=4 [0x00000004]}) at qcoreapplication.cpp:1063
          frame #33: 0x00007ff997de2c6f Qt6Cored.dll`QCoreApplication::sendEvent(receiver=0x000002467b022e10 {...}, event=0x0000008e2139bbf8 {id=4 [0x00000004]}) at qcoreapplication.cpp:1471
          frame #34: 0x00007ff9981e12f9 Qt6Cored.dll`QEventDispatcherWin32Private::sendTimerEvent(this=0x0000024678127410 {interrupt={std::_Atomic_integral_facade<int>={...}}, internalHwnd=0x000000000ab90adc {unused=???}, sendPostedEventsTimerId=0 [0x0000000000000000], ...}, timerId=4 [0x00000004]) at qeventdispatcher_win.cpp:404
          frame #35: 0x00007ff9981e08fd Qt6Cored.dll`QEventDispatcherWin32::event(this=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, e=0x000002467e9320a0 {id=4 [0x00000004]}) at qeventdispatcher_win.cpp:884
          frame #36: 0x00007ff997de6b52 Qt6Cored.dll`QCoreApplicationPrivate::notify_helper(receiver=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qcoreapplication.cpp:1224
          frame #37: 0x00007ff997de9240 Qt6Cored.dll`doNotify(receiver=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qcoreapplication.cpp:1153
          frame #38: 0x00007ff997de3572 Qt6Cored.dll`QCoreApplication::notify(this=0x0000008e2139f6b8 {...}, receiver=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qcoreapplication.cpp:1139
          frame #39: 0x00007ff9880908ff Qt6Guid.dll`QGuiApplication::notify(this=0x0000008e2139f6b8 {...}, object=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qguiapplication.cpp:1928
          frame #40: 0x00007ff997de5447 Qt6Cored.dll`QCoreApplication::notifyInternal2(receiver=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qcoreapplication.cpp:1063
          frame #41: 0x00007ff997de2c6f Qt6Cored.dll`QCoreApplication::sendEvent(receiver=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, event=0x000002467e9320a0 {id=4 [0x00000004]}) at qcoreapplication.cpp:1471
          frame #42: 0x00007ff997de77af Qt6Cored.dll`QCoreApplicationPrivate::sendPostedEvents(receiver=0x0000000000000000 {d_ptr={d=???}}, event_type=0 [0x00000000], data=0x0000024678144470 {_ref={std::_Atomic_integral_facade<int>={...}}, loopLevel=1 [0x00000001], scopeLevel=3 [0x00000003], ...}) at qcoreapplication.cpp:1830
          frame #43: 0x00007ff9981e0a6f Qt6Cored.dll`QEventDispatcherWin32::sendPostedEvents(this=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}) at qeventdispatcher_win.cpp:903
          frame #44: 0x00007ff988743f05 Qt6Guid.dll`QWindowsGuiEventDispatcher::sendPostedEvents(this=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}) at qwindowsguieventdispatcher.cpp:79
          frame #45: 0x00007ff9981ded0f Qt6Cored.dll`QEventDispatcherWin32::processEvents(this=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, flags={i=36 [0x00000024]}) at qeventdispatcher_win.cpp:472
          frame #46: 0x00007ff988743ebb Qt6Guid.dll`QWindowsGuiEventDispatcher::processEvents(this=0x00000246781992a0 {m_flags={i=36 [0x00000024]}}, flags={i=36 [0x00000024]}) at qwindowsguieventdispatcher.cpp:72
          frame #47: 0x00007ff997e08d5c Qt6Cored.dll`QEventLoop::processEvents(this=0x0000008e2139f5a8 {...}, flags={i=36 [0x00000024]}) at qeventloop.cpp:139
          frame #48: 0x00007ff997e09034 Qt6Cored.dll`QEventLoop::exec(this=0x0000008e2139f5a8 {...}, flags={i=0 [0x00000000]}) at qeventloop.cpp:230
          frame #49: 0x00007ff997de2a67 Qt6Cored.dll`QCoreApplication::exec() at qcoreapplication.cpp:1378
          frame #50: 0x00007ff98809088a Qt6Guid.dll`QGuiApplication::exec() at qguiapplication.cpp:1860
          frame #51: 0x00007ff71fb013c7 qml.exe`main(argc=1 [0x00000001], argv=0x0000024678142f60 {0x0000024678142f70 "C:\Users\hanxixian\Desktop\tmp\qml-tst1\cmake-build-clang-cl\qml.exe"}) at main.cpp:32
          frame #52: 0x00007ff71fb0c9b9 qml.exe`invoke_main() at exe_common.inl:78
          frame #53: 0x00007ff71fb0caee qml.exe`__scrt_common_main_seh() at exe_common.inl:288
          frame #54: 0x00007ff71fb0cb6e qml.exe`__scrt_common_main() at exe_common.inl:330
          frame #55: 0x00007ff71fb0cb8e qml.exe`mainCRTStartup(__formal=0x0000008e215a6000) at exe_main.cpp:16
          frame #56: 0x00007ffa71237344 kernel32.dll`BaseThreadInitThunk + 20
          frame #57: 0x00007ffa71e226b1 ntdll.dll`RtlUserThreadStart + 33 
      MRE:
      import QtQuick
      import QtQuick.Window
      import QtQuick.Controls
      import Qt5Compat.GraphicalEffects
      
      Window {
          id: root
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
          color: "black"
      
          property var modelArray: []
      
          Menu {
              id: menu
              Repeater {
                  model: modelArray
                  MenuItem{
                      text: modelData
                  }
              }
          }
          MouseArea {
              anchors.fill: parent
              onClicked: menu.open()
          }
          Timer {
              running: true
              interval: 500
              repeat: true
              onTriggered: {
                  modelArray = [Date().toString()]
              }
          }
      }
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            isudfv 希贤 韩
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes