summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/input
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2025-12-12 12:02:54 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2025-12-16 18:25:45 +0100
commit5c8cd2a5f3ea838c710bac6f31ac92eb9d38a232 (patch)
treeb5c0c0cafcd6a7cb7c2a8de8a3ec9f3523f9a75c /src/platformsupport/input
parentce9613fd8b2b3fc971334440fb0b0d187f73325a (diff)
testlib: Guard against loggers being torn down when loggingHEADdev
During application shutdown our global static list of loggers may be torn down, and then some other part of Qt issues logging during its own destruction. For example, QThreadStorage will emit: QThreadStorage: entry 1 destroyed before end of thread 0x106432bd0 which would crash: frame #7: 0x000000010a8d97a8 QtCore`qt_assert_x(where="Type *QGlobalStatic<QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>>::operator->() [Holder = QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>]", what="The global static was used after being destroyed", file="/Users/torarne/dev/qt/qtbase/src/corelib/global/qglobalstatic.h", line=88) at qassert.cpp:126:14 frame #8: 0x0000000101016e5c QtTest`QGlobalStatic<QtGlobalStatic::Holder<QTest::(anonymous namespace)::Q_QGS_loggers>>::operator->(this=0x00000001010808c8) at qglobalstatic.h:87:9 frame #9: 0x0000000101018f78 QtTest`QTest::messageHandler(type=QtWarningMsg, context=0x000000016fdfb848, message=0x000000016fdfb790) at qtestlog.cpp:308:30 frame #10: 0x000000010a131018 QtCore`qt_message_print(msgType=QtWarningMsg, context=0x000000016fdfb848, message=0x000000016fdfb790) at qlogging.cpp:2133:9 frame #11: 0x000000010a12bc50 QtCore`qt_message(msgType=QtWarningMsg, context=0x000000016fdfb848, msg="QThreadStorage: entry %d destroyed before end of thread %p", ap="\U00000001") at qlogging.cpp:411:5 frame #12: 0x000000010a8d9904 QtCore`QMessageLogger::warning(this=0x000000016fdfba30, msg="QThreadStorage: entry %d destroyed before end of thread %p") const at qlogging.cpp:651:5 frame #13: 0x000000010a62b8b8 QtCore`QThreadStoragePrivate::finish(tls=0x00000008c6c102e8) at qthreadstorage.cpp:169:17 frame #14: 0x000000010a617aec QtCore`QThreadPrivate::finish()::$_0::operator()(this=0x000000016fdfbb20) const at qthread_unix.cpp:468:9 frame #15: 0x000000010a6159a4 QtCore`void (anonymous namespace)::terminate_on_exception<QThreadPrivate::finish()::$_0>(t=0x000000016fdfbb20) at qthread_unix.cpp:380:5 frame #16: 0x000000010a615960 QtCore`QThreadPrivate::finish(this=0x00000008c707c000) at qthread_unix.cpp:450:5 frame #17: 0x000000010a617190 QtCore`destroy_current_thread_data(data=0x00000008c6c10280) at qthread_unix.cpp:172:19 frame #18: 0x000000010a617330 QtCore`(anonymous namespace)::QThreadDataDestroyer::EarlyMainThread::~EarlyMainThread(this=0x000000010aa9e640) at qthread_unix.cpp:232:17 frame #19: 0x000000010a6172b4 QtCore`(anonymous namespace)::QThreadDataDestroyer::EarlyMainThread::~EarlyMainThread(this=0x000000010aa9e640) at qthread_unix.cpp:229:9 frame #20: 0x0000000181ac542c libsystem_c.dylib`__cxa_finalize_ranges + 480 frame #21: 0x0000000181ac51ec libsystem_c.dylib`exit + 44 Pick-to: 6.11 6.10 6.8 Change-Id: Ie85788e49a34aa75fe44b52fb488bd0e763b78f9 Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
Diffstat (limited to 'src/platformsupport/input')
0 files changed, 0 insertions, 0 deletions