Bug 492113 - [Crash] Touch gesture for "Sampling Color" in [Canvas Input Setting] cause SAFE ASSERT warning and crash
Summary: [Crash] Touch gesture for "Sampling Color" in [Canvas Input Setting] cause SA...
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 502718 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-24 01:54 UTC by Protoniv
Modified: 2025-09-02 13:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Protoniv 2024-08-24 01:54:59 UTC
SUMMARY

On touch screen devices, Use "Two (or Three) finger drag" for sampling foreground color cause three SAFE ASSERT warning popup, ignore them all and krita just crash.

Crashlog from terminal
```
krita.input: KisAbstractInputAction "Alternate Invocation" tried to process event data from an unhandled event type QEvent::TouchCancel
SAFE ASSERT (krita): "m_d->strokeId" in file /builds/graphics/krita/libs/ui/tool/KisAsyncColorSamplerHelper.cpp, line 224
SAFE ASSERT (krita): "!m_sanityIsStarting" in file /builds/graphics/krita/libs/global/kis_signal_compressor.cpp, line 210
SAFE ASSERT (krita): "m_d->strokeId" in file /builds/graphics/krita/libs/ui/tool/KisAsyncColorSamplerHelper.cpp, line 224

Thread 1 "krita" received signal SIGSEGV, Segmentation fault.
0x00007ffff79b0d74 in KisAbstractShortcut::shortcutIndex() const ()
   from /tmp/.mount_krita-rWENdf/usr/bin/../lib/libkritaui.so.20

```

Opensuse Leap 15.6
krita-5.3.0-prealpha-242de665a4-x86_64.appimage

STEPS TO REPRODUCE
1. On a touch Screen, Set Canvas Input Setting > Alternate Invocation > Gesture | Two Finger Drag | Sampling Foreground Color
2.  Draw on Canvas, and use gesture to sample color
3. Safe assert popup, ignore them all and crash


ADDITIONAL INFORMATION
Tested on Android 12 in early August "5.3.0-prealpha" build also has the same issue.
Comment 1 AppTest 2025-08-23 05:20:01 UTC
*** Bug 502718 has been marked as a duplicate of this bug. ***
Comment 2 AppTest 2025-08-23 05:26:38 UTC
Can confirm crash still exists as of August 16, 2025 nightly on Android
Comment 3 AppTest 2025-08-23 05:32:33 UTC
The shortcut works perfectly in 5.2.11. It's the 5.3 nightly with the crash
Comment 4 AppTest 2025-09-02 13:02:39 UTC
Crash is also currently present in 5.2 nightlies