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

Random AbstractButton crashes in destructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.12.6
    • Quick: Controls 2
    • None
    • windows, ubuntu desktop, target linux elina. qt 5.12.6
    • All

    Description

      In our project we have listview in which we have complex delegate which contains qml AbstractButton element. When we use "indicator" property our application sometimes crashes when model calls endResetModel(). I add simple custom model in our application and reset it very quickly removing all model data, and then resetting and adding new data to model. So application eventually will crash on windows, ubuntu desktop linux and target linux.

      I can't reproduce the issue in test application so all i can do is share with you stacktrace from coredumps, hoping it will be enough.

      Coredump on ubuntu desktop(top):

      #0 0x00007f7640bcdb45 in QVector<QQuickItemPrivate::ChangeListener>::indexOf(QQuickItemPrivate::ChangeListener const&, int) const () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Quick.so.5
       #1 0x00007f7640bc6343 in QQuickItemPrivate::removeItemChangeListener(QQuickItemChangeListener*, QFlags<QQuickItemPrivate::ChangeType>) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Quick.so.5
       #2 0x00007f75c7d269c1 in QQuickAbstractButton::~QQuickAbstractButton() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5QuickTemplates2.so.5
       #3 0x00007f75c785db06 in QQmlPrivate::QQmlElement<QQuickAbstractButton>::~QQmlElement() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.so
       #4 0x00007f763f578c86 in QQmlObjectCreator::clear() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #5 0x00007f763f50526a in QQmlIncubatorPrivate::clear() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #6 0x00007f763f50536a in QQmlIncubator::clear() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #7 0x00007f763f5d9ae8 in QQmlDelegateModelPrivate::releaseIncubator(QQDMIncubationTask*) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #8 0x00007f763f5de114 in QQmlDelegateModelPrivate::itemsRemoved(QVector<QQmlListCompositor::Remove> const&, QVarLengthArray<QVector<QQmlChangeSet::Change>, 11>*, QHash<int, QList<QQmlDelegateModelItem*> >*) ()
       from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #9 0x00007f763f5e0370 in QQmlDelegateModelPrivate::itemsMoved(QVector<QQmlListCompositor::Remove> const&, QVector<QQmlListCompositor::Insert> const&) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #10 0x00007f763f5e1b7c in QQmlDelegateModel::_q_modelReset() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #11 0x00007f763f5e2095 in QQmlDelegateModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #12 0x00007f763f5e2458 in QQmlDelegateModel::qt_metacall(QMetaObject::Call, int, void**) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Qml.so.5
       #13 0x00007f763ed96034 in QMetaObject::activate(QObject*, int, int, void**) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Core.so.5
       #14 0x00007f763ed1986a in QAbstractItemModel::modelReset(QAbstractItemModel::QPrivateSignal) () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Core.so.5
       #15 0x00007f763ed1b3dc in QAbstractItemModel::endResetModel() () from /mnt/newdisk/work/qt/Qt5.12.6/5.12.6/gcc_64/lib/libQt5Core.so.5
      

      Coredump on target board(top):

      #0 0x0000007f9abf78b8 in QVector<QQuickItemPrivate::ChangeListener>::indexOf (this=this@entry=0x3c6736c0, t=..., from=from@entry=0) at /usr/include/QtCore/qvector.h:902
      #1 0x0000007f9abf02b8 in QVector<QQuickItemPrivate::ChangeListener>::removeOne (t=..., this=0x3c6736c0) at /usr/include/QtCore/qvector.h:177
      #2 QQuickItemPrivate::removeItemChangeListener (this=0x3c673630, listener=<optimized out>, types=...) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/quick/items/qquickitem.cpp:3935
      #3 0x0000007f4bd74110 in QQuickControlPrivate::removeImplicitSizeListener (item=<optimized out>, listener=listener@entry=0x3dd2a0d0, changes=...) at /usr/src/debug/qtquickcontrols2/5.12.6+gitAUTOINC+ed92154c71-r0/git/src/quicktemplates2/qquickcontrol.cpp:868
      #4 0x0000007f4bd74120 in QQuickControlPrivate::removeImplicitSizeListener (this=this@entry=0x3dd29f90, item=<optimized out>, changes=...) at /usr/src/debug/qtquickcontrols2/5.12.6+gitAUTOINC+ed92154c71-r0/git/src/quicktemplates2/qquickcontrol.cpp:854
      #5 0x0000007f4bd5b230 in QQuickAbstractButton::~QQuickAbstractButton (this=0x3da72000, __in_chrg=<optimized out>) at /usr/src/debug/qtquickcontrols2/5.12.6+gitAUTOINC+ed92154c71-r0/git/src/quicktemplates2/qquickabstractbutton.cpp:454
      #6 0x0000007f4bc3f794 in QQmlPrivate::QQmlElement<QQuickAbstractButton>::~QQmlElement (this=0x3da72000, __in_chrg=<optimized out>) at /usr/include/QtQml/qqmlprivate.h:108
      #7 QQmlPrivate::QQmlElement<QQuickAbstractButton>::~QQmlElement (this=0x3da72000, __in_chrg=<optimized out>) at /usr/include/QtQml/qqmlprivate.h:108
      #8 0x0000007f99dc2268 in QQmlObjectCreator::clear (this=this@entry=0x3dda4170) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/qml/qqmlobjectcreator.cpp:1418
      #9 0x0000007f99d4da9c in QQmlIncubatorPrivate::clear (this=0x3dda3fd0) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/qml/qqmlincubator.cpp:173
      #10 0x0000007f99d4db70 in QQmlIncubator::clear (this=this@entry=0x3dac0470) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/qml/qqmlincubator.cpp:562
      #11 0x0000007f99e25ce8 in QQmlDelegateModelPrivate::releaseIncubator (this=this@entry=0x3c6c1620, incubationTask=0x3dac0470) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/types/qqmldelegatemodel.cpp:913
      #12 0x0000007f99e2a0c4 in QQmlDelegateModelPrivate::itemsRemoved (this=this@entry=0x3c6c1620, removes=..., translatedRemoves=translatedRemoves@entry=0x7ff373bab0, movedItems=0x7ff373bbf0, movedItems@entry=0x7ff373baa8)
      at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/types/qqmldelegatemodel.cpp:1437
      #13 0x0000007f99e2c33c in QQmlDelegateModelPrivate::itemsMoved (this=this@entry=0x3c6c1620, removes=..., inserts=...) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/types/qqmldelegatemodel.cpp:1521
      #14 0x0000007f99e2db5c in QQmlDelegateModel::_q_modelReset (this=this@entry=0x3ddd9b00) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/git/src/qml/types/qqmldelegatemodel.cpp:1662
      #15 0x0000007f99e2e150 in QQmlDelegateModel::qt_static_metacall (_o=_o@entry=0x3ddd9b00, _c=_c@entry=QMetaObject::InvokeMetaMethod, _id=_id@entry=7, _a=_a@entry=0x7ff373be10)
      at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/build/src/qml/.moc/moc_qqmldelegatemodel_p.cpp:197
      #16 0x0000007f99e2e480 in QQmlDelegateModel::qt_metacall (this=0x3ddd9b00, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7ff373be10) at /usr/src/debug/qtdeclarative/5.12.6+gitAUTOINC+179c4b689d-r0/build/src/qml/.moc/moc_qqmldelegatemodel_p.cpp:334
      #17 0x0000007f997db814 in QMetaObject::activate (sender=0x0, sender@entry=0x3c20c4e0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=18, argv=argv@entry=0x7ff373be10)
      at /usr/src/debug/qtbase/5.12.6+gitAUTOINC+f0b93f7a4b-r0/git/src/corelib/kernel/qobject.cpp:3821
      #18 0x0000007f997dbdec in QMetaObject::activate (sender=sender@entry=0x3c20c4e0, m=<optimized out>, local_signal_index=local_signal_index@entry=18, argv=argv@entry=0x7ff373be10)
      at /usr/src/debug/qtbase/5.12.6+gitAUTOINC+f0b93f7a4b-r0/git/src/corelib/kernel/qobject.cpp:3656
      #19 0x0000007f9975e4cc in QAbstractItemModel::modelReset (this=this@entry=0x3c20c4e0, _t1=...) at /usr/src/debug/qtbase/5.12.6+gitAUTOINC+f0b93f7a4b-r0/build/src/corelib/.moc/moc_qabstractitemmodel.cpp:647
      #20 0x0000007f997600d0 in QAbstractItemModel::endResetModel (this=0x3c20c4e0) at /usr/src/debug/qtbase/5.12.6+gitAUTOINC+f0b93f7a4b-r0/git/src/corelib/itemmodels/qabstractitemmodel.cpp:3276
      

       
      I hope it will be enough. If my data is not enough please say what you need additionally

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              yury Yury Khristoforov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes