Bug 474182 - Crash when closing program in ~QQuickAnimatedImage()
Summary: Crash when closing program in ~QQuickAnimatedImage()
Status: RESOLVED LATER
Alias: None
Product: Tokodon
Classification: Applications
Component: general (show other bugs)
Version: 23.08.0
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Joshua Goins
URL:
Keywords: drkonqi
: 482252 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-09-05 10:13 UTC by incredible.angst
Modified: 2024-03-16 19:15 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (11.15 KB, text/plain)
2023-11-04 12:47 UTC, Jan Iversen
Details
New crash information added by DrKonqi (1.51 KB, text/plain)
2023-12-15 18:48 UTC, Vadim A. Misbakh-Soloviov (mva)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description incredible.angst 2023-09-05 10:13:04 UTC
Application: tokodon (23.08.0)

Qt Version: 5.15.10
Frameworks Version: 5.109.0
Operating System: Linux 6.4.12-arch1-1 x86_64
Windowing System: X11
Distribution: Arch Linux
DrKonqi: 5.27.7 [KCrashBackend]

-- Information about the crash:
When closing Tokodon normally (by closing its main window), Tokodon crashed. Seems that it happened when deinitializing an instance of QQuickAnimatedImage.

The crash does not seem to be reproducible.

-- Backtrace:
Application: Tokodon (tokodon), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  0x00007f3bcccdca2b in std::__atomic_base<QMutexData*>::compare_exchange_strong(QMutexData*&, QMutexData*, std::memory_order, std::memory_order) (__m2=std::memory_order_acquire, __m1=std::memory_order_acquire, __p2=0x1, __p1=<synthetic pointer>: <optimized out>, this=0x7f3bcf0e26b8) at /usr/include/c++/13.2.1/atomic:621
#7  std::atomic<QMutexData*>::compare_exchange_strong(QMutexData*&, QMutexData*, std::memory_order, std::memory_order) (__p2=0x1, __m1=std::memory_order_acquire, __m2=std::memory_order_acquire, __p1=<synthetic pointer>: <optimized out>, this=0x7f3bcf0e26b8) at /usr/include/c++/13.2.1/atomic:623
#8  QAtomicOps<QMutexData*>::testAndSetAcquire<QMutexData*>(std::atomic<QMutexData*>&, QMutexData*, QMutexData*, QMutexData**) (currentValue=0x0, newValue=0x1, expectedValue=0x0, _q_value=std::atomic<QMutexData *> = { 0x841f0f }) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:308
#9  QBasicAtomicPointer<QMutexData>::testAndSetAcquire(QMutexData*, QMutexData*) (newValue=0x1, expectedValue=0x0, this=0x7f3bcf0e26b8) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:264
#10 QBasicMutex::fastTryLock() (this=0x7f3bcf0e26b8) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:122
#11 QBasicMutex::lock() (this=0x7f3bcf0e26b8) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:83
#12 0x00007f3bcccef153 in QRecursiveMutexPrivate::lock(int) (timeout=-1, this=0x7f3bcf0e26a0 <QQuickAnimatedImage::frameChanged()>) at thread/qmutex.cpp:780
#13 QMutex::lock() (this=<optimized out>) at thread/qmutex.cpp:235
#14 0x00007f3bcce9992e in std::unique_lock<QMutex>::lock() (this=<synthetic pointer>) at /usr/include/c++/13.2.1/bits/unique_lock.h:133
#15 std::unique_lock<QMutex>::unique_lock(QMutex&) (__m=..., this=<synthetic pointer>, this=<optimized out>, __m=<optimized out>) at /usr/include/c++/13.2.1/bits/unique_lock.h:71
#16 (anonymous namespace)::qt_unique_lock<QMutex> (mutex=...) at ../../include/QtCore/5.15.10/QtCore/private/../../../../../src/corelib/thread/qlocking_p.h:106
#17 QCoreApplicationPrivate::lockThreadPostEventList(QObject*) (object=object@entry=0x5649c659c3b0) at kernel/qcoreapplication.cpp:1500
#18 0x00007f3bcce99a22 in QCoreApplication::postEvent(QObject*, QEvent*, int) (receiver=0x5649c659c3b0, event=0x5649c6a25a80, priority=0) at kernel/qcoreapplication.cpp:1546
#19 0x00007f3bcf0e79d9 in QQuickAnimatedImage::~QQuickAnimatedImage() (this=0x5649c6aea080, this=<optimized out>) at /usr/src/debug/qt5-declarative/qtdeclarative/src/quick/items/qquickanimatedimage.cpp:151
#20 0x00007f3bcf1b99aa in QQmlPrivate::QQmlElement<QQuickAnimatedImage>::~QQmlElement() (this=0x5649c6aea080, this=<optimized out>) at ../../include/QtQml/../../../qtdeclarative/src/qml/qml/qqmlprivate.h:144
#21 QQmlPrivate::QQmlElement<QQuickAnimatedImage>::~QQmlElement() (this=0x5649c6aea080, this=<optimized out>) at ../../include/QtQml/../../../qtdeclarative/src/qml/qml/qqmlprivate.h:144
#22 0x00007f3bccec73bd in QObjectPrivate::deleteChildren() (this=this@entry=0x5649c6ae9e00) at kernel/qobject.cpp:2137
#23 0x00007f3bccec7b39 in QObject::~QObject() (this=<optimized out>, this=<optimized out>) at kernel/qobject.cpp:1115
#24 0x00007f3bcf1b87db in QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (this=0x5649c6ae9d40, this=<optimized out>) at ../../include/QtQml/../../../qtdeclarative/src/qml/qml/qqmlprivate.h:144
#25 QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement() (this=0x5649c6ae9d40, this=<optimized out>) at ../../include/QtQml/../../../qtdeclarative/src/qml/qml/qqmlprivate.h:144
#26 0x00007f3bccec73bd in QObjectPrivate::deleteChildren() (this=this@entry=0x5649c547ac30) at kernel/qobject.cpp:2137
#27 0x00007f3bccec7b39 in QObject::~QObject() (this=<optimized out>, this=<optimized out>) at kernel/qobject.cpp:1115
#28 0x00005649c4a9d4ee in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/tokodon/tokodon-23.08.0/src/main.cpp:260
[Inferior 1 (process 582194) detached]

Reported using DrKonqi
Comment 1 Joshua Goins 2023-09-07 16:04:09 UTC
Can confirm I've been hitting this as well, more AnimatedImage "fun" :D
Comment 2 Joshua Goins 2023-09-20 11:58:42 UTC
I'm closing this for now, unfortunately. AnimatedImage is being used by one of our libraries (kirigami-addons) in the fullscreen image viewer, since it can handle GIFs. This bug is reproducible on Qt5 only bug, and as we're switching to Qt6 for the next major release it's no longer an issue.
Comment 3 Jan Iversen 2023-11-04 12:47:03 UTC
Created attachment 162858 [details]
New crash information added by DrKonqi

tokodon (23.08.2) using Qt 5.15.11

I just closed Tokodon and the crash reporter opens. I  was able to reproduce this several times.

-- Backtrace (Reduced):
#4  0x00007f58cb4f0281 in QCoreApplication::postEvent (receiver=0x559af1aa1f10, event=0x559af0cda720, priority=<optimized out>) at kernel/qcoreapplication.cpp:1600
#5  0x00007f58cb516c41 in QObject::deleteLater (this=<optimized out>) at kernel/qobject.cpp:2340
#6  0x00007f58cd932384 in QQuickAnimatedImage::~QQuickAnimatedImage (this=this@entry=0x559af1adebd0, __in_chrg=<optimized out>) at /usr/src/debug/qtdeclarative-everywhere-src-5.15.11+kde30/src/quick/items/qquickanimatedimage.cpp:151
#7  0x00007f58cda079a5 in QQmlPrivate::QQmlElement<QQuickAnimatedImage>::~QQmlElement (this=0x559af1adebd0, __in_chrg=<optimized out>) at ../../include/QtQml/../../../src/qml/qml/qqmlprivate.h:144
#8  QQmlPrivate::QQmlElement<QQuickAnimatedImage>::~QQmlElement (this=0x559af1adebd0, __in_chrg=<optimized out>) at ../../include/QtQml/../../../src/qml/qml/qqmlprivate.h:144
Comment 4 Vadim A. Misbakh-Soloviov (mva) 2023-12-15 18:48:10 UTC
Created attachment 164207 [details]
New crash information added by DrKonqi

tokodon (23.08.2) using Qt 5.15.11

Tokodon crashed when I closed it...

-- Backtrace (Reduced):
#4  0x00007fb3aa8d57e2 in QRecursiveMutexPrivate::lock(int) () at /usr/lib64/libQt5Core.so.5
#5  0x00007fb3aaa86094 in QCoreApplicationPrivate::lockThreadPostEventList(QObject*) () at /usr/lib64/libQt5Core.so.5
#6  0x00007fb3aaa86809 in QCoreApplication::postEvent(QObject*, QEvent*, int) () at /usr/lib64/libQt5Core.so.5
#7  0x00007fb3acd02aa4 in QQuickAnimatedImage::~QQuickAnimatedImage() () at /usr/lib64/libQt5Quick.so.5
#8  0x00007fb3acdd8fc5 in QQmlPrivate::QQmlElement<QQuickAnimatedImage>::~QQmlElement() () at /usr/lib64/libQt5Quick.so.5
Comment 5 Joshua Goins 2024-03-16 19:15:31 UTC
*** Bug 482252 has been marked as a duplicate of this bug. ***