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

State switched model crashes with ComponentBehaviour Bound

    XMLWordPrintable

Details

    • 20f608651 (dev), 61333a892 (6.6), 0b942a8d8 (6.5)

    Description

      The attached example toggles the list models using State and a button. Pressing the button for the first and second time switches the model.

      Pressing the button the third time makes the list empty. Pressing the button the fourth time crashes the application:

      #0  0x00007f83e26f1444 in QQmlContext::isValid() const (this=0xb746b50) at /home/qt/work/qt/qtdeclarative/src/qml/qml/qqmlcontext.cpp:146
      #1  0x00007f83e27179cd in QQmlExpression::QQmlExpression(QQmlScriptString const&, QQmlContext*, QObject*, QObject*)
          (this=this@entry=0x7fff6ce15860, script=..., ctxt=ctxt@entry=0x0, scope=scope@entry=0x0, parent=parent@entry=0x0) at /home/qt/work/qt/qtdeclarative/src/qml/qml/qqmlexpression.cpp:108
      #2  0x00007f83e2d9bb54 in QQuickStateChangeScript::execute() (this=0xb7dd5c0) at /home/qt/work/qt/qtdeclarative/src/quick/util/qquickstatechangescript.cpp:91
      #3  0x00007f83e2db294a in QQuickTransitionManager::transition(QList<QQuickStateAction> const&, QQuickTransition*, QObject*)
          (this=this@entry=0xb7085e0, list=..., transition=transition@entry=0x0, defaultTarget=defaultTarget@entry=0x0) at /home/qt/work/qt/qtdeclarative/src/quick/util/qquicktransitionmanager.cpp:206
      #4  0x00007f83e2d94eb0 in QQuickState::apply(QQuickTransition*, QQuickState*) (this=this@entry=0xb707fe0, trans=trans@entry=0x0, revert=revert@entry=0xb708d90)
          at /home/qt/work/qt/qtdeclarative/src/quick/util/qquickstate.cpp:649
      #5  0x00007f83e2d9cf6a in QQuickStateGroupPrivate::setCurrentStateInternal(QString const&, bool) (this=0xb707cb0, state=..., ignoreTrans=ignoreTrans@entry=false)
          at /home/qt/work/qt/qtdeclarative/src/quick/util/qquickstategroup.cpp:507
      #6  0x00007f83e2d9da50 in QQuickStateGroup::setState(QString const&) (this=this@entry=0xb707c80, state=...) at /home/qt/work/qt/qtdeclarative/src/quick/util/qquickstategroup.cpp:287
      #7  0x00007f83e2d9e04a in QQuickStateGroupPrivate::updateAutoState() (this=0xb707cb0) at /home/qt/work/qt/qtdeclarative/src/quick/util/qquickstategroup.cpp:366
      #8  0x00007f83e26d24a6 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const
          (this=<optimized out>, target=<optimized out>, value=<optimized out>, flags=...)
          at /home/qt/work/qt/qtdeclarative_build/include/QtQml/6.5.1/QtQml/private/../../../../../../qtdeclarative/src/qml/qml/qqmlpropertydata_p.h:339
      #9  0x00007f83e26d1638 in GenericBinding<1>::write(void*, QMetaType, bool, QFlags<QQmlPropertyData::WriteFlag>)
      ...
      

      Removing pragma ComponentBehavior: Bound makes the toggling work fine.

      Attachments

        1. sandbox.tgz
          2 kB
          Cajus Pollmeier
        For Gerrit Dashboard: QTBUG-115106
        # Subject Branch Project Status CR V

        Activity

          People

            ulherman Ulf Hermann
            cajus Cajus Pollmeier
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes