Bug 363283

Summary: Mouse cursor occasionally being displayed in brush mode
Product: [Applications] krita Reporter: Tyson Tan <tysontanx>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, halla, raghu, welcome
Priority: NOR Keywords: regression
Version: 3.0 Release Candidate   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Mouse cursor displayed when brush tool in use
demo showing the deadzone while painting
Mouse cursor appears after saving when brush tool is in use
Test file for BUG363283

Description Tyson Tan 2016-05-19 16:55:44 UTC
On a local build of krita3-testing_2+git20160517+r15-67~ubuntu16.04.1, my mouse cursor occasionally appears when brush tool is in use. This is not supposed to happen as it blocks the brush area. 

So far I could not figure out what triggered it. But I'm sure it didn't happen with the previous PPA krita3-testing packages. My executed operations includes:
1. Brush mode in use;
2. Mirror Mode toggled;
3. Eraser Mode toggled;
4. Selecting different layers;
5. Move canvas;
6. Ctrl+LMB pick color.

Tested on Ubuntu Gnome Edition 16.04.
Print screen button could not capture the cursor. I will upload a photo later.
Switching to other tools, doing any window actions will eliminate the cursor.

Reproducible: Always
Comment 1 Tyson Tan 2016-05-19 16:59:10 UTC
Created attachment 99074 [details]
Mouse cursor displayed when brush tool in use

When taking this photo, I was pressing Ctrl to pick color, and you can see the cursor stuck as normal mouse cursor, not a color picker icon.
Comment 2 Halla Rempt 2016-05-21 14:31:19 UTC
Hi Tyson,

Wolthera reports she's seen this as well, though not recently.
Comment 3 Raghavendra kamath 2016-05-24 11:59:48 UTC
I encountered this issue in recent git update,

at certain area on the canvas the cursor turns to arrow and if you start to paint stroke inthese area the mouse cursor gets stuck to arrow and no paint is applied on canvas.

you can see the video here -> https://dl.dropboxusercontent.com/u/37777793/mouse.mp4 (i'll attach this to report as well) notice the dead zone circle in black stroke at 0.30s 

these dead zones are created randomly anywhere near the area you are panting
Comment 4 Raghavendra kamath 2016-05-24 12:01:47 UTC
Created attachment 99153 [details]
demo showing the deadzone while painting
Comment 5 Halla Rempt 2016-05-25 11:55:28 UTC
I've also seen it.
Comment 6 Halla Rempt 2016-05-25 11:56:57 UTC
*** Bug 363225 has been marked as a duplicate of this bug. ***
Comment 7 Dmitry Kazakov 2016-05-25 15:00:05 UTC
I cannot reproduce it here with Graphire2 + Qt 5.5.1. Probably, Qt 5.6 is somehow related...
Comment 8 Camille Bissuel 2016-05-25 19:38:54 UTC
Can't reproduce under Antergos Linux with QT 5.6 and a git complied Krita from yesterday… Is this with a wacom tablet ?
Comment 9 Tyson Tan 2016-05-26 00:32:44 UTC
Dmitry:
Ubuntu 16.04 -- which I was using when I reported the bug -- has Qt 5.5.1 though.
I'm running on intuos4+Cintiq12HD+1normal display (dual screen).
I don't recall seeing this when Cintiq12HD was unplugged.
I don't recall seeing this when doing very low-res pixel art (smaller than 640x480).
Comment 10 Tyson Tan 2016-06-28 12:44:18 UTC
Recently I have been primarily working on pixel art, never once did this bug happen. But once I return to print size pictures, I see this bug ALL THE TIME.

Right now I'm using only Intuos4 with an normal monitor, drawing a picture the size of about 5700x2600, using a memory of 258MB. It happens almost every time I toggle something. Thus, I think it's not related to a certain tablet, but definitely has something to do with resolution.

I have to revert to Krita 2.9 for now. There is no way I can keep my flow going with a constant distraction like that.
Comment 11 Tyson Tan 2016-06-28 17:22:52 UTC
I've tested it on Windows 10. Could not reproduce the bug there. So it's probably a Ubuntu 16.04 specific bug. Also, Krita 3.0 beta didn't have this bug either. But again, it could be the old betas were running on Ubuntu 15.10. I don't know.
Comment 12 Tyson Tan 2016-06-28 18:03:52 UTC
I've done a few now tests on Ubuntu 16.04, and found a pattern that triggers the bug very easily:

1. Select Eraser_circle, erase something;
2. Save the change with Ctrl+S

When the save dialogue is finished, the normal mouse cursor will appear. Apparently, the longer Krita stay opened, the more you use save, the more often the mouse cursor appears, until it happens every time you do a save.

At least it has something to do with that SAVE dialogue, I guess?
Comment 13 Tyson Tan 2016-06-28 18:09:48 UTC
Created attachment 99745 [details]
Mouse cursor appears after saving when brush tool is in use

I managed to capture a video for this bug at work because I can trigger it every time when I try in this session, for unknown reason. Normally it doesn't happen a lot in the beginning of a Krita session, but after a while it gets really often, like what I did in this video.
Comment 14 Tyson Tan 2016-06-28 18:15:45 UTC
Created attachment 99748 [details]
Test file for BUG363283

I was testing using this document. I hope you can reproduce the bug using it!
Comment 15 Camille Bissuel 2016-06-29 08:04:13 UTC
I'm sorry I still can't reproduce with your file, but I confirm it happened to me also to see the system cursor after saving. And we both use Gnome 3.
I confirm also this tend to happen after some time using Krita, but I don't do pixel art, so I can't say if it's linked to resolution or memory.

Tyson, can you please test to reproduce comment 7 or 8 in Bug 363225 ? I don't know if it's linked or not… Boudewijn was thinking this is similar but I'm not convinced… 
I suppose there is something wrong happening on the input side when Krita is losing and gaining the window or screen focus again.
Comment 16 Tyson Tan 2016-06-29 11:32:30 UTC
Hi Camille, I can reproduce Comment 8 in Bug 363225. I commented there. It really felt like these 2 bugs are related somehow, because both happened after an icon shift.
Comment 17 Tyson Tan 2016-08-15 14:09:42 UTC
New found easy workaround:
When cursor stuck at mouse mode, move the cursor out of the canvas onto the toolbar/titlebar of the Krita window, then return to canvas -- the cursor is now back to normal.
Comment 18 Halla Rempt 2016-09-26 14:37:43 UTC
This is fixed in the import/export refactoring branch. It was related to the cursor override and restore when saving.
Comment 19 Tyson Tan 2016-10-13 08:23:46 UTC
Thank you, Boud! :D