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

SpringAnimation crashes when used in ListView's Transition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.2.0 RC1
    • 5.0.2, 5.1.1, 5.2.0 Beta1
    • None
    • I've been able to reproduce this crash with Qt 5.1.1 and Qt 5.2.0 Beta 1 on Arch Linux x86_64 and with Qt 5.0.2 on Windows XP 32-bit. The stacktrace is from Qt 5.1.1 on Arch Linux.

      SpringAnimation crashes when it completes and is used in ListView's Transition. This happens always when ListView's model has more than one item. It doesn't crash when the model doesn't have multiple items.

      crash.qml
      import QtQuick 2.0
      
      Rectangle {
          width: 250
          height: 250
      
          ListView {
              anchors.fill: parent
              model: ListModel {
                  ListElement { text: "A" }
                  ListElement { text: "B" }
              }
      
              populate: Transition {
                  SpringAnimation { properties: "x"; from: -100; to: 0; spring: 4; damping: 0.3 }
              }
      
              delegate: Text {
                  text: "Test"
              }
          }
      }
      

      The crash happens because in QSpringAnimation::updateCurrentTime at util/qquickspringanimation.cpp:311, animationTemplate is NULL but still dereferenced.

        1. crash.qml
          0.3 kB
          Mika Rauhala
        2. stacktrace.txt
          9 kB
          Mika Rauhala
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            laknoll Lars Knoll
            rauhala Mika Rauhala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes