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

Use of XAnimator and YAnimator causes crash when inside a view Transition, other animators do not have any effect

    XMLWordPrintable

Details

    • b8a85408d943bffba403d783b9082bd279460bed (qt/qtdeclarative/dev)

    Description

      Using XAnimator or YAnimator inside a transition in a view such as ListView may cause a crash if the frequency of inserting and removing items from the model is high enough. It's easy to reproduce.

      Other animators such as OpacityAnimator or ScaleAnimator don't seem to have any effect at all when used in the transition.

      Tested with a threaded render loop. The crash occurs in the main gui thread.

      Test application is attached.

      Example:

          ListView {
              anchors.top: parent.top
              anchors.left: parent.left
              anchors.bottom: parent.bottom
              anchors.right: parent.horizontalCenter
      
              model: testClass
      
              add: Transition {
                  NumberAnimation { property: "scale";   from: 0; to: 1; duration: 500 }
                  NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 500 }
              }
              displaced: Transition {
                   YAnimator { duration: 500 } // <<--- BIG BANG!
                  // Animation alternative:
                  //NumberAnimation { property: "y";       duration: 500;   }
      
                  NumberAnimation { property: "opacity"; to: 1.0 }
                  NumberAnimation { property: "scale";   to: 1.0 }
              }
              remove: Transition {
                  NumberAnimation { property: "opacity"; to: 0; duration: 500 }
                  NumberAnimation { property: "scale";   to: 0; duration: 500 }
              }
      
              delegate: viewDelegate
          }
      

      Attachments

        Issue Links

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

          Activity

            People

              yulong.bai Bai Yulong
              pyrrhula Ola Røer Thorsen
              Votes:
              3 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes