Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5, 6.7
-
None
-
-
66a76da0a (dev), 21e9875d6 (dev), 701263379 (6.8), 7e5f80ebb (tqtc/lts-6.5)
-
Foundation Sprint 116, Foundation Sprint 117
Description
QObject::timerEvent may be called before the timer elapsed because timer ids are aggressively reused by Qt's timers. This issue can happen if
- A timer was recently stopped
- There are remaining WM_TIMER events in the Windows event queue
- QObject::startTimer is used to create a new timer
Under these conditions, QObject::startTimer will likely reuse the timer id of the previously stopped timer. This causes premature execution of QObject::timerEvent when the lingering WM_TIMER is processed.
This can for example cause premature false return from QSignalSpy even if no signals were received, which leads to flaky tests.
See also
Attachments
Issue Links
- is duplicated by
-
QTBUG-132926 Guard WinTimerInfo::obj with a QPointer
-
- Closed
-
- relates to
-
QTBUG-124853 [REG: 6.5.3 - 6.7.0] QNetworkRequest is sometimes canceled if setTransferTimeout ist set
-
- Reported
-
-
QTBUG-114152 QTimer: Make timers' timeouts ordered
-
- Open
-
- resulted in
-
QTBUG-124925 [REG 6.5.5 -> 6.5.6] Spectrum App Crashes after recording sound in "Record and Playback" Mode
-
- Closed
-