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

[CRASH] QQmlDelegateModel is using objects that are deleted by VM

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.3.2, 5.4.1, 5.5.0
    • None

    Description

      The object that QQmlDelegateModelPrivate::release tries to use was just deleted by VM.

      Here is the call stack:

      0 ?? 0x200040034
      1 QMetaObject::cast qmetaobject.cpp 339 0x7ffff6889374
      2 qobject_cast<QQmlDelegateModelItem*> qobject.h 528 0x7ffff6f93500
      3 QQmlDelegateModelItem::dataForObject qqmldelegatemodel.cpp 1973 0x7ffff6f8a4df
      4 QQmlDelegateModelPrivate::release qqmldelegatemodel.cpp 509 0x7ffff6f82bf6
      5 QQmlDelegateModel::release qqmldelegatemodel.cpp 533 0x7ffff6f82ccd
      6 QQuickItemViewPrivate::releaseItem qquickitemview.cpp 2350 0x7ffff7ba4c47
      7 QQuickListViewPrivate::releaseItem qquicklistview.cpp 604 0x7ffff7b44567
      8 QQuickItemViewPrivate::clear qquickitemview.cpp 1685 0x7ffff7ba1a7b
      9 QQuickListViewPrivate::clear qquicklistview.cpp 553 0x7ffff7b4419b
      10 QQuickItemView::setModel qquickitemview.cpp 291 0x7ffff7b9b8db
      11 QQuickItemView::qt_metacall moc_qquickitemview_p.cpp 817 0x7ffff7c3b76a
      12 QQuickListView::qt_metacall moc_qquicklistview_p.cpp 576 0x7ffff7c285a8
      13 QMetaObject::metacall qmetaobject.cpp 303 0x7ffff68892ff
      14 QQmlPropertyPrivate::write qqmlproperty.cpp 1314 0x7ffff6e9ade8
      15 QQmlPropertyPrivate::writeValueProperty qqmlproperty.cpp 1238 0x7ffff6e9a6a1
      16 QQmlPropertyPrivate::writeBinding qqmlproperty.cpp 1571 0x7ffff6e9c969
      17 QQmlBinding::update qqmlbinding.cpp 230 0x7ffff6f25636
      18 QQmlBinding::update qqmlbinding_p.h 97 0x7ffff6f260ca
      19 QQmlBinding::expressionChanged qqmlbinding.cpp 291 0x7ffff6f25bdc
      20 QQmlJavaScriptExpressionGuard_callback qqmljavascriptexpression.cpp 363 0x7ffff6f1b9a6
      21 QQmlNotifier::emitNotify qqmlnotifier.cpp 73 0x7ffff6ef9f97
      22 QQmlData::signalEmitted qqmlengine.cpp 709 0x7ffff6e804ce
      23 QMetaObject::activate qobject.cpp 3596 0x7ffff68c3628
      24 QMetaObject::activate qobject.cpp 3575 0x7ffff68c342e
      25 MyObjectList::listChanged moc_myobjectlist.cpp 160 0x4051f5
      26 MyObjectList::qt_static_metacall moc_myobjectlist.cpp 77 0x404f5b
      27 QMetaObject::activate qobject.cpp 3709 0x7ffff68c3c1d
      28 QMetaObject::activate qobject.cpp 3575 0x7ffff68c342e
      29 QTimer::timeout moc_qtimer.cpp 192 0x7ffff6954cf7
      30 QTimer::timerEvent qtimer.cpp 255 0x7ffff68cecf1
      31 QObject::event qobject.cpp 1230 0x7ffff68bd2b4
      32 QCoreApplicationPrivate::notify_helper qcoreapplication.cpp 1057 0x7ffff6880dec
      33 QCoreApplication::notify qcoreapplication.cpp 1002 0x7ffff6880ace
      34 QGuiApplication::notify qguiapplication.cpp 1556 0x7ffff72bbc2e
      35 QCoreApplication::notifyInternal qcoreapplication.cpp 940 0x7ffff68809d8
      36 QCoreApplication::sendEvent qcoreapplication.h 236 0x7ffff68845f3
      37 QTimerInfoList::activateTimers qtimerinfo_unix.cpp 643 0x7ffff68f7d34
      38 timerSourceDispatch qeventdispatcher_glib.cpp 185 0x7ffff68f904a
      39 g_main_context_dispatch /lib/x86_64-linux-gnu/libglib-2.0.so.0 0x7ffff2716c1d
      40 ?? /lib/x86_64-linux-gnu/libglib-2.0.so.0 0x7ffff2716f08
      41 g_main_context_iteration /lib/x86_64-linux-gnu/libglib-2.0.so.0 0x7ffff2716fbc
      42 QEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 428 0x7ffff68f9a19
      43 QPAEventDispatcherGlib::processEvents qeventdispatcher_glib.cpp 123 0x7fffee8959fa
      44 QEventLoop::processEvents qeventloop.cpp 136 0x7ffff687d67c
      45 QEventLoop::exec qeventloop.cpp 212 0x7ffff687d955
      46 QCoreApplication::exec qcoreapplication.cpp 1193 0x7ffff68810b2
      47 QGuiApplication::exec qguiapplication.cpp 1535 0x7ffff72bbb56
      48 main main.cpp 16 0x402375

      I attached a simple example which can be used to reproduce the problem every time.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            taipan BogDan Vatra
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes