Created attachment 149674 [details] crash backtrace SUMMARY STEPS TO REPRODUCE 1. Assign "One Finger Drag" gesture to "Zoom and Rotate Canvas" (Discrete Rotate Mode) in Canvas Input Settings 2. Perform one finger drag gesture on canvas OBSERVED RESULT Crash EXPECTED RESULT At least it shouldn't crash SOFTWARE/OS VERSIONS Windows: Windows 10
Since the KisZoomAndRotate::inputEvent hardcodes for two touch points, it's logical that there'll be a crash if there's only one of them: const QPointF p0 = tevent->touchPoints().at(0).pos(); const QPointF p1 = tevent->touchPoints().at(1).pos(); I'm not sure what we should do here, ignore the event if there's only one touchpoint or make sure this setting is impossible.
Git commit 0a3a0148c9b107668e378b4113bbaae28df871ce by Halla Rempt. Committed on 24/06/2022 at 09:09. Pushed by rempt into branch 'master'. Check the size of the touchpoints array before indexing M +20 -18 libs/ui/input/kis_zoom_and_rotate_action.cpp https://invent.kde.org/graphics/krita/commit/0a3a0148c9b107668e378b4113bbaae28df871ce
Git commit 85faf731616931baed7ec48ccfb84a266d96a625 by Halla Rempt. Committed on 24/06/2022 at 09:10. Pushed by rempt into branch 'krita/5.1'. Check the size of the touchpoints array before indexing (cherry picked from commit 0a3a0148c9b107668e378b4113bbaae28df871ce) M +20 -18 libs/ui/input/kis_zoom_and_rotate_action.cpp https://invent.kde.org/graphics/krita/commit/85faf731616931baed7ec48ccfb84a266d96a625