Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
5.12.3
-
None
Description
I'm debugging a popular application[1] crash when running under Wayland/FlatPak. And I've traced the problem down to Qt I think.
There are 23 threads at the moment of the crash. All but one of them are blocked at a poll() or pthread_cond_wait().
The crashing thread's backtrace is this: https://pastebin.com/An9wDXM2
Examining the backtrace, I get to know that QObject::startTimer() will trigger a call to QAbstractEventDispatcherPrivate::allocateTimerId() whose body is:
{ return timerIdFreeList()->next(); }
timerIdFreeList() returns the NULL and causes the app to crash. timerIdFreeList is declared as:
typedef QFreeList<void, QtTimerIdFreeListConstants> QtTimerIdFreeList; Q_GLOBAL_STATIC(QtTimerIdFreeList, timerIdFreeList)
Taking a look at Q_GLOBAL_STATIC, I've got the impression that it should never return NULL as long as the application doesn't exit. Maybe the application was already on some exit-cycle and stange shutdown order led to this issue. I'd like hints on how to proceed to debug this issue.
[1] Telegram Desktop
Attachments
For Gerrit Dashboard: QTBUG-75779 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
271148,2 | Client: Crash instead of exit when there's a wayland error | 5.12 | qt/qtwayland | Status: MERGED | +2 | 0 |