Bug 396034 - After switching tools, quickly displaying PopUpPalette using Tablet buttons freezes tools.
Summary: After switching tools, quickly displaying PopUpPalette using Tablet buttons f...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tablets (tablet issues are only very rarely bugs in Krita!) (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 406953 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-30 22:39 UTC by Lukas Remis
Modified: 2019-04-28 17:09 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Canvas frozen after using pop-up palette (2.53 MB, video/mp4)
2018-09-20 07:11 UTC, Alberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Remis 2018-06-30 22:39:33 UTC
Hi,

Just downloaded Krita and wanted to test it. Unfortunately it's very unstable on OSX 10.13.5. The cursor disappears a lot, especially when choosing some tools from left or right menu, and moving back to drawing area. The cursor is either completely gone and you can't draw or it's a cursor of "window resizing".

Lukas
Comment 1 vanyossi 2018-07-01 04:58:26 UTC
Hi!

I'm on OSX 10.13.5, I'm sorry I have no problems related to the cursor disapearing on tool selection no matter how many times I changed tools. is there someting in particular you were doing?.

The cursor getting stuck in another "icon" has been reported (zoom icon, windowresizing icon and arrow icon", it seems to be related to a missing event, but we haven't find any time to fix it yet. the original bug report is here https://bugs.kde.org/show_bug.cgi?id=390642
Comment 2 Lukas Remis 2018-07-01 07:50:16 UTC
Hi,

Thank you for a fast reaction :)
I did a little bit more testing, and recorded my screen: https://drive.google.com/file/d/1fjHm7siGOTiXuVqcLJ5sgmvPgxta2nRg/view?usp=sharing

So as you can see, after few brush strokes I'm opening the tool palette (I don't know how you call it in Krita, sorry ;), and my cursor seems to be unable to get in, it stucks on the border. Although it's probably inside, cause when I click something happens, like the paint color is changing. I was able to recreate this at least two times.

Then at the end, you can see that the patch tool stopped working, although this time the brush cursor is visible, it doesn't do anything. Later I tried changing the tool to brush, it also wasn't working. And I was unable to open the right click palette - it was not popping up.

Also I get a feeling that the program is a bit laggy. I'm on Macmini i7 (I7-3720QM), 16 GB RAM, SSD drive. I work a lot in Photoshop and it runs smoothly on this configuration.

Lukas
Comment 3 vanyossi 2018-07-03 09:31:13 UTC
This report seems to be 2 bugs instead of one.

PopUpPalette works perfectly fine, but because the "cursor gets stuck" problem it causes the cursor to remain in painting more instead of changing to the arrow. The workaround for now is to set the cursor shape to something other than "no cursor". This will work for brush tool but not for the patch tool as it doesn't have a cursor shape :c

I could only get the tools stuck one time and it seems to be related to a problem in PopUpPalette and the ResourceManager as when it happened the tags in the PopupPalette were not working properly displaying random brushes instead of the brushes for that category. However in your video it seems to happend after a tile got badly rendered, not after using the popupPalette. After it got stuck no tool on any document created in that session would work afterwards.

After some trying I could get the state of tools stuck a little consistent but im not entirely sure when, it sometimes happen after selecting the patch tool and haveing a enormmous brush size, others after closing the popUpPalette. I'll  confirm this this bug for now.
Comment 4 vanyossi 2018-07-04 00:10:37 UTC
The bug triggers a SAFE_ASSERT

SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557
	SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557
QLayout: Attempting to add QLayout "" to QWidget "KritaShape/KisToolDynaoption widget", which already has a layout
SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557
SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557
SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557
SAFE ASSERT (krita): "!m_d->readyShortcut" in file /Volumes/Osiris/programs/krita-master/src/libs/ui/input/kis_shortcut_matcher.cpp, line 557

How to reproduce

After some attempts of 
1. clicking "Smart Patch tool"
2. Change brush with popUpPalette
3. use patch tool.

The assert is triggered. this provoques the tool to be in the active mode, so even if its selected the tool will appear to be broken.

I could only trigger the assert with the "Smart Patch tool"
Comment 5 Alberto 2018-09-20 07:09:53 UTC
I can confirm this bug as well with Wacom Intuos tablet using these repro steps:

1. Create new document, sketch on default layer
2. Create new layer and hide layer drawn on above
3. Sketch on new layer and bring up pop-up palette window using button on pen
4. Select a new tool and attempt to draw
5. Observe canvas UI is not responsive, unable to recover without quitting Krita

Krita
  Version: 4.1.1

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: darwin
  Kernel Version: 17.7.0
  Pretty Productname: macOS High Sierra (10.13)
  Product Type: osx
  Product Version: 10.13

OpenGL Info
  **OpenGL not initialized**

I am attaching a video with repro above.
Comment 6 Alberto 2018-09-20 07:11:18 UTC
Created attachment 115112 [details]
Canvas frozen after using pop-up palette

Pen taps are indicated with red circles, larger circles indicate pressing pen button. Canvas does not respond to either inputs.
Comment 7 jdreske 2019-02-04 15:02:55 UTC
I found workarounds for the problems on OSX:
If the cursor icon gets stuck as magnifying glass by zooming with the trackpad just rotate with two fingers on the trackpad. The image will not rotate, not supported luckily, but the icon gets normal again.

If you cannot draw because the cursor on the canvas does not react anymore, because of clicking with the wacom somewhere in a docker (for example choose a color with the small color selector) : 
lift the pen - once the pen is out of reach the icon gets normal again and is not stuck in the middle of the canvas anymore.

(by the way: opening the preference window and closing it works also (Cmd-,)(Esc) )

perhaps this helps to find a solution - seems it is about switching focus with the tablet. No Problem with the Trackpad)
Comment 8 jdreske 2019-02-04 18:13:37 UTC
In some cases lifting the pen does not help.
If the cursor freezes after usinng the pop up palette only opening/closing the preference window works.
Comment 9 Dmitry Kazakov 2019-04-17 18:12:05 UTC
It might be the same Enter/Leave problem that we just fixed on Windows and Linux...
Comment 10 vanyossi 2019-04-17 18:36:32 UTC
I no longer get this bug after 91963c577fad5adb226809fac4c00aeafb846128
Comment 11 lunibackup 2019-04-28 17:09:22 UTC
*** Bug 406953 has been marked as a duplicate of this bug. ***