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.