Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
Tested on Linux
-
d97c42b7fdb4b370ec5a09ef5d6f04e2e22f241d
Description
Say an instance of ClassA is the parent of a QAbstractAnimation object, and Q_GLOBAL_STATIC is used to create an instance of ClassA. When the application is closed and the global static objects are deleted, if the animation is still running, the Q_ASSERT(runningLeafAnimations >= 0) in QUnifiedTimer::unregisterRunningAnimation() can fail.
This happens if the unifiedTimer global static in qabstractanimation.cpp is deleted before the ClassA global static. When the ClassA parent deletes its QAbstractAnimation child, QAbstractAnimation internally calls QUnifiedTimer::instance(), which creates a new QUnifiedTimer instance since the global static has already been deleted. Then it calls QUnifiedTimer::unregisterRunningAnimation(), and the assert failure is triggered because runningLeafAnimations has not been incremented for the new instance of QUnifiedTimer.
Attached is a small example.
Attachments
Issue Links
- relates to
-
QTBUG-9928 Crash when closing a QML app with debugger session
- Closed
-
QTBUG-9928 Crash when closing a QML app with debugger session
- Closed