Bug 458586

Summary: Krita with a Wacom Intuos Pro (Large) Zoom/Pan pen functionality causes Krita canvas to become unusable
Product: [Applications] krita Reporter: Noah <noah>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: REPORTED ---    
Severity: normal CC: halla, shzam
Priority: NOR    
Version First Reported In: 5.1.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Krita's "Submit Bug Report" debug text
tablet l,og 1
tablet log 2

Description Noah 2022-09-01 00:37:21 UTC
Created attachment 151749 [details]
Krita's "Submit Bug Report" debug text

SUMMARY
Some links to the Krita artists forum where I describe this in detail, which I'll link for posterity and then re-summarize below:
- https://krita-artists.org/t/bug-zoom-tool-and-application-pointer-gets-stuck-requiring-application-restart-video-included/34795
- https://krita-artists.org/t/gets-stuck-on-magnifying-glass-then-literally-cannot-use-any-tool-buttons/45634/12?u=nezteb

Video demo: https://www.youtube.com/watch?v=-UAm-15wvxU

It's not just sometimes either. I can reliably reproduce it every single time. I've tried it on multiple Mac machines too: one 2018 MacBook Air, a 2017 MacBook Pro, a 2020 MacBook Pro. etc. Oddly enough, if I trigger this bug and then open the tablet tester, my pen strokes register there just fine. I can even click around the UI and it's nice and responsive. But the canvas itself becomes completely unusable.

Also none of the suggestions mentioned in various forum posts work for me:
- Hitting the escape key
- Using CMD+plus and CMD+minus
- Using the normal trackpad to "unstick" the zoom
- Clicking outside of the canvas/application
- Turning off the "touch" features of the tablet so that only my pen will register input

I even ended up contacting Wacom and they had a technical support person walk me through tons of debugging steps, none of which worked.

Even the logs show nothing of note:
```
SESSION: 31 Aug 2022 16:44:49 -0700. Executing /Applications/krita.app/Contents/MacOS/krita
Krita Version: 5.1.0, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 5132
-- -- -- -- -- -- -- --
31 Aug 2022 16:44:49 -0700: Style: macintosh. Available styles: macintosh, Windows, Fusion
31 Aug 2022 16:44:50 -0700: Database is up to date. Version: 0.0.17, created by Krita 5.1.0, at Tue Aug 30 14:51:02 2022
31 Aug 2022 16:45:21 -0700: Created image "Unnamed", 3508 * 4960 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
31 Aug 2022 16:53:53 -0700: Autosaving: /Users/noah/.krita-5132-document_0-autosave.kra
31 Aug 2022 16:53:53 -0700: Converting from application/x-krita to application/x-krita. Location: /Users/noah/.krita-5132-document_0-autosave.kra. Real location: /Users/noah/.krita-5132-document_0-autosave.kra. Batchmode: 0. Configuration: none
31 Aug 2022 16:53:54 -0700: Completed saving /Users/noah/.krita-5132-document_0-autosave.kra (mime: application/x-krita). Result: OK. Warning: . Size: 444564
31 Aug 2022 17:02:27 -0700: Removing autosave file: /Users/noah/.krita-5132-document_0-autosave.kra
31 Aug 2022 17:02:28 -0700: CLOSING SESSION
```
The Log Viewer docker tool shows even less (with all log categories enabled).

STEPS TO REPRODUCE
1. Open Krita 5.1.0
2. Connect Wacom Intuos Pro
3. Configure tablet to use the "Pan/Scroll" functionality on pen button click (pen button mode "Hover Click" and "Click & Tap" make no difference)
4. Start drawing in Krita, use button to pan
5. The canvas is no longer editable, but the rest of the application is still usable and responsive

OBSERVED RESULT
The pen Pan/Scroll functionality should not lock up the canvas.

EXPECTED RESULT
The canvas because locked to any edits.

Also see attached text file containing the text from the "Submit Bug Report" pop-up window.
Comment 1 Noah 2022-09-01 06:49:26 UTC
Errrrr, minor typo:

> OBSERVED RESULT
> The canvas becomes locked to any edits.
> 
> EXPECTED RESULT
> The pen Pan/Scroll functionality should not lock up the canvas.
Comment 2 sh_zam 2022-09-01 06:53:32 UTC
Hello! Can you please attach Tablet Event logs both before and right after? (https://docs.krita.org/en/contributors_manual/user_support.html#gathering-information). The "Step 5" here (Ctrl + Shift + T).
Comment 3 Noah 2022-09-02 03:01:39 UTC
(In reply to sh_zam from comment #2)
> Hello! Can you please attach Tablet Event logs both before and right after?
> (https://docs.krita.org/en/contributors_manual/user_support.html#gathering-
> information). The "Step 5" here (Ctrl + Shift + T).

Sorry for the delay; work has been busy!

The log before the bug occurs: https://pastebin.com/DStHB9nH (normal)

The log after the bug occurs: https://pastebin.com/sYDW2RV7 (noticed the line "Start blocking mouse events" after I click and hold the pen button and touch the tablet)
Comment 4 Bug Janitor Service 2022-09-02 04:36:11 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Halla Rempt 2022-09-07 11:58:42 UTC
Created attachment 151885 [details]
tablet l,og 1
Comment 6 Halla Rempt 2022-09-07 11:58:57 UTC
Created attachment 151886 [details]
tablet log 2