Details
Description
Tested using a trackpad, not sure if you can reproduce using other input devices.
In a widget with the Qt::Tool window flag ("Tool Widget" in the attached example):
- press and hold finger down, then swipe up with three fingers;
- release all fingers at the end of the gesture.
The application crashes.
Cause of the crash:
- NSEvent locationInWindow property for the LeftMouseUp event returns an NSPoint with NaN values;
- QGuiApplicationPrivate::processMouseEvent detects this event changes the cursor position and buttons, so splits it in two, sending the position change first;
- QGuiApplicationPrivate::processMouseEvent stores the last event position and uses it for the check above, however NaN values cannot be compared and so QGuiApplicationPrivate::processMouseEvent is called recursively until the buttons change;
- The application then crashes with EXC_BAD_ACCESS.
Attachments
For Gerrit Dashboard: QTBUG-67194 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
224049,3 | macOS: Handle NaN mouse event positions | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |
224144,2 | macOS: Handle NaN mouse event positions | 5.9 | qt/qtbase | Status: MERGED | +2 | 0 |