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

Assert failure when stopping an animator

    XMLWordPrintable

Details

    • b71b4b8ef9e41210a5119c965126ccf0e50d3a36

    Description

      After the animator internals were redone (https://codereview.qt-project.org/#/c/168949/), there's an assert failure in qquick_syncback_helper() when stopping a running animator:

      ASSERT: "!job->isRunning()" in file util/qquickanimatorjob.cpp, line 223
      

      Test case (just run & click anywhere):

      import QtQuick 2.7
      import QtQuick.Window 2.2
      
      Window {
          id: window
          visible: true
      
          OpacityAnimator {
              id: animator
              running: true
              loops: Animation.Infinite
              target: window.contentItem
          }
      
          MouseArea {
              anchors.fill: parent
              onClicked: animator.stop()
          }
      }
      

      Backtrace:

      #0  0x00007ffff52236f5 in raise () at /lib64/libc.so.6
      #1  0x00007ffff52252fa in abort () at /lib64/libc.so.6
      #2  0x00007ffff639524f in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) (context=..., message=...) at global/qlogging.cpp:1683
      #3  0x00007ffff639168e in QMessageLogger::fatal(char const*, ...) const (this=0x7fffffff9f10, msg=0x7ffff66cfc50 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:795
      #4  0x00007ffff6389bf4 in qt_assert(char const*, char const*, int) (assertion=0x7ffff7c25767 "!job->isRunning()", file=0x7ffff7c256c6 "util/qquickanimatorjob.cpp", line=223) at global/qglobal.cpp:3004
      #5  0x00007ffff7966953 in qquick_syncback_helper(QAbstractAnimationJob*) (job=0x824dc0) at util/qquickanimatorjob.cpp:223
      #6  0x00007ffff7966a05 in QQuickAnimatorProxyJob::syncBackCurrentValues() (this=0x824e80) at util/qquickanimatorjob.cpp:237
      #7  0x00007ffff796649f in QQuickAnimatorProxyJob::updateState(QAbstractAnimationJob::State, QAbstractAnimationJob::State) (this=0x824e80, newState=QAbstractAnimationJob::Stopped)
          at util/qquickanimatorjob.cpp:169
      #8  0x00007ffff6f2ca54 in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) (this=0x824e90, newState=QAbstractAnimationJob::Stopped) at animations/qabstractanimationjob.cpp:366
      #9  0x00007ffff6f2d21c in QAbstractAnimationJob::stop() (this=0x824e90) at animations/qabstractanimationjob.cpp:536
      #10 0x00007ffff7907f4e in QQuickAbstractAnimation::setRunning(bool) (this=0xa2bfc0, r=false) at util/qquickanimation.cpp:290
      #11 0x00007ffff7908629 in QQuickAbstractAnimation::stop() (this=0xa2bfc0) at util/qquickanimation.cpp:544
      

      Attachments

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

        Activity

          People

            sletta Gunnar Sletta
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes