Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.0
-
None
-
63bbbdc4b8dba7be5690065dc6a4ffa5a85b1b32 (qt/qtbase/dev) 763c08d809759343ca3558e84ae1a28f5d63b7df (qt/qtbase/5.15)
Description
When QGuiApplicationPrivate::processMouseEvent() is called with a MouseEvent where globalPos contains NaN, it will set positionChanged to true even if it is exactly the same position. If e->enhancedMouseEvent() is set and the event is not a NonClientAreaMouseMove or MouseMove event, it will recursively call QGuiApplicationPrivate::processMouseEvent(). (Normally there would only be one recursive call, but because NaN != NaN the code does not notice that it already moved the lastCursorPosition.) This endless recursion will cause a stack overflow.
Obviously there should not be any NaN in globalPos, but e.g. the evdev touch code produces this sometimes. (I'll file another bug about that.)
Attachments
For Gerrit Dashboard: QTBUG-86207 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
311124,3 | Ignore mouse events where globalPos contains NaN | dev | qt/qtbase | Status: MERGED | +2 | 0 |
315998,2 | Ignore mouse events where globalPos contains NaN | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |