Bug 408826 - Painting suddenly stops and any attempt to save the current file produces "Waiting for image operation to complete" dialog
Summary: Painting suddenly stops and any attempt to save the current file produces "Wa...
Status: RESOLVED DUPLICATE of bug 409275
Alias: None
Product: krita
Classification: Unclassified
Component: Brush engines (show other bugs)
Version: 4.2.1
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-17 13:04 UTC by Alan Skinner
Modified: 2019-07-31 08:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-4889-0.html (1.33 KB, text/html)
2019-06-17 19:18 UTC, Alan Skinner
Details
attachment-6236-0.html (1.28 KB, text/html)
2019-06-17 19:56 UTC, Alan Skinner
Details
attachment-23219-0.html (1.58 KB, text/html)
2019-06-18 19:13 UTC, Alan Skinner
Details
attachment-24930-0.html (988 bytes, text/html)
2019-06-18 20:18 UTC, Alan Skinner
Details
attachment-15551-0.html (1.65 KB, text/html)
2019-06-19 16:48 UTC, Alan Skinner
Details
attachment-6606-0.html (1.64 KB, text/html)
2019-06-20 11:31 UTC, Alan Skinner
Details
attachment-15128-0.html (1.01 KB, text/html)
2019-06-27 12:19 UTC, Alan Skinner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Skinner 2019-06-17 13:04:44 UTC
SUMMARY
Painting suddenly stops and any attempt to save the current file produces "Waiting for image operation to complete" dialog

STEPS TO REPRODUCE
It happens now for every session since 4.21 on Win 10 16GB.  There are no specific steps that I have found. To me, it seems to appear randomly.  No issues prior to 4.21. Was using 4.0 previously

- working on canvas 4000x1960 @ 300 DPI (this time. other times smaller sizes)
- Using Pencil 5 Tilted and Eraser Soft only. 

 

OBSERVED RESULT

- The rest of the app appears to be fine/clickable (menus, dockers, etc)
- Everything was great until the next stroke didn't appear on the canvas.  Haven't found anything to bring it back or save the existing file.


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Tusooa Zhu 2019-06-17 13:07:49 UTC
It looks like the image is not correctly unlocked. What size of the brushes are you using? Are you using OpenGL or DirectX or just CPU canvas?
Comment 2 Alan Skinner 2019-06-17 19:18:28 UTC
Created attachment 120956 [details]
attachment-4889-0.html

Using standard Krita 4 brushes at default settings and OpenGL.
(Auto(OpenGL))

On Mon, Jun 17, 2019 at 9:07 AM <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> tusooa@vista.aero changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |tusooa@vista.aero
>
> --- Comment #1 from tusooa@vista.aero ---
> It looks like the image is not correctly unlocked. What size of the
> brushes are
> you using? Are you using OpenGL or DirectX or just CPU canvas?
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 3 Halla Rempt 2019-06-17 19:44:27 UTC
And if you switch to Angle?
Comment 4 Alan Skinner 2019-06-17 19:56:05 UTC
Created attachment 120957 [details]
attachment-6236-0.html

I've never used that setting before.  I'll try it tomorrow and let you know

On Mon, Jun 17, 2019 at 3:44 PM Boudewijn Rempt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |boud@valdyas.org
>
> --- Comment #3 from Boudewijn Rempt <boud@valdyas.org> ---
> And if you switch to Angle?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 5 Alan Skinner 2019-06-18 19:13:18 UTC
Created attachment 120983 [details]
attachment-23219-0.html

Changed to Angle and used Krita today for 6.5 hours with no crash.  Also,
and coincidentally, I had restarted my machine after a Blender crash last
night.  I'm now wondering if a reboot wouldn't have cleared things up
anyway.  However, so far so good.  Is there any benefit to using the Angle
implementation in general or should I try going back to OpenGL? Any benefit
either way?

On Mon, Jun 17, 2019 at 3:44 PM Boudewijn Rempt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> Boudewijn Rempt <boud@valdyas.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |boud@valdyas.org
>
> --- Comment #3 from Boudewijn Rempt <boud@valdyas.org> ---
> And if you switch to Angle?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 6 Halla Rempt 2019-06-18 19:18:15 UTC
Some people claim that opengl gives them smoother performance; others claim Angle is smoother. Use what works, I guess.
Comment 7 Alan Skinner 2019-06-18 20:18:14 UTC
Created attachment 120986 [details]
attachment-24930-0.html

ok.  I'll let you know if the issue crops up again and, if so, if I can
make it repeatable.

On Tue, Jun 18, 2019 at 3:18 PM Boudewijn Rempt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> --- Comment #6 from Boudewijn Rempt <boud@valdyas.org> ---
> Some people claim that opengl gives them smoother performance; others claim
> Angle is smoother. Use what works, I guess.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 8 Alan Skinner 2019-06-19 16:48:01 UTC
Created attachment 121005 [details]
attachment-15551-0.html

The issue cropped up twice this morning while using the ANGLE setting.  I
know the second time I had just used the Previous Brush shortcut to switch
to the eraser.  I'm not sure about the first time. In both cases I was
using the Pencil Tilted and Eraser_Soft brushes. The only other app running
was the Firefox browser.

On Tue, Jun 18, 2019 at 4:17 PM Alan Skinner <askinner432@gmail.com> wrote:

> ok.  I'll let you know if the issue crops up again and, if so, if I can
> make it repeatable.
>
> On Tue, Jun 18, 2019 at 3:18 PM Boudewijn Rempt <bugzilla_noreply@kde.org>
> wrote:
>
>> https://bugs.kde.org/show_bug.cgi?id=408826
>>
>> --- Comment #6 from Boudewijn Rempt <boud@valdyas.org> ---
>> Some people claim that opengl gives them smoother performance; others
>> claim
>> Angle is smoother. Use what works, I guess.
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>> You are on the CC list for the bug.
>
>
Comment 9 Halla Rempt 2019-06-20 08:58:52 UTC
Could you make a backup of your kritarc file and check if it still happens with a clean configuration (see https://docs.krita.org/en/KritaFAQ.html#resetting-krita-configuration)? 

Your images are really small by size, but are they complex? Do you have many layers and clone layers for instance?
Comment 10 Halla Rempt 2019-06-20 09:10:09 UTC
Oh, more questions:

* Is Instant Preview on or off (see the View menu)
* Are you using animation features?
Comment 11 Alan Skinner 2019-06-20 11:31:08 UTC
Created attachment 121030 [details]
attachment-6606-0.html

- 2 layers (one background and one sketch)
- nothing complex, just simple pencil sketching
- Instant Preview is off
- no animation

The only change I've made from default install so far is installing and
removing some brushes.  The last thing I installed was the DA brush set and
then applied some tags.

I've used Krita for years and have never seen this behavior before.  I did
notice in the bug tracker that someone else reported what appeared to be
the same problem (https://bugs.kde.org/show_bug.cgi?id=408041).

I'll try a fresh Krita install and see what happens



On Thu, Jun 20, 2019 at 5:10 AM Boudewijn Rempt <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> --- Comment #10 from Boudewijn Rempt <boud@valdyas.org> ---
> Oh, more questions:
>
> * Is Instant Preview on or off (see the View menu)
> * Are you using animation features?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.
Comment 12 Halla Rempt 2019-06-20 11:42:41 UTC
No, that's nothing out of the way. Reinstalling Krita won't reset your configuration, though, so you will still need to do that manually.
Comment 13 Dmitry Kazakov 2019-06-25 15:19:52 UTC
Hi, Alan!

Do you remember, did you try to use selection tools right before you got the hangup?
Comment 14 Alan Skinner 2019-06-25 15:47:43 UTC
I’m sure that I didn’t. Just sketching and erasing using the last brush command to toggle between the two brushes. 

> On Jun 25, 2019, at 11:19 AM, Dmitry Kazakov <bugzilla_noreply@kde.org> wrote:
> 
> https://bugs.kde.org/show_bug.cgi?id=408826
> 
> --- Comment #13 from Dmitry Kazakov <dimula73@gmail.com> ---
> Hi, Alan!
> 
> Do you remember, did you try to use selection tools right before you got the
> hangup?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 15 Alan Skinner 2019-06-27 12:19:03 UTC
Created attachment 121180 [details]
attachment-15128-0.html

update: It's been several days since I reset the kritarc file and I've not
experienced the problem. I'll let you know if it happens again.

On Tue, Jun 25, 2019 at 11:19 AM Dmitry Kazakov <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=408826
>
> --- Comment #13 from Dmitry Kazakov <dimula73@gmail.com> ---
> Hi, Alan!
>
> Do you remember, did you try to use selection tools right before you got
> the
> hangup?
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 16 Dmitry Kazakov 2019-07-29 10:16:57 UTC
Git commit 07167cd2d884b35dafaca6c78556e37574fabfc4 by Dmitry Kazakov.
Committed on 29/07/2019 at 10:16.
Pushed by dkazakov into branch 'master'.

Add a workaround for KisShortcutsMatcher assert

The problem is caused by execution flow entering KisShortcutsMatcher
recursively because of doing QApplication::processEvent in the tool's
event hander.
BACKPORT:krita/4.2

M  +15   -6    libs/ui/tool/kis_tool.cc

https://invent.kde.org/kde/krita/commit/07167cd2d884b35dafaca6c78556e37574fabfc4
Comment 17 Halla Rempt 2019-07-29 10:25:18 UTC
Git commit df673e77fb91d8f1326579ac0312b11ce35795d0 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 29/07/2019 at 10:25.
Pushed by rempt into branch 'krita/4.2'.

Add a workaround for KisShortcutsMatcher assert

The problem is caused by execution flow entering KisShortcutsMatcher
recursively because of doing QApplication::processEvent in the tool's
event hander.
BACKPORT:krita/4.2

M  +15   -6    libs/ui/tool/kis_tool.cc

https://invent.kde.org/kde/krita/commit/df673e77fb91d8f1326579ac0312b11ce35795d0
Comment 18 Dmitry Kazakov 2019-07-30 15:32:05 UTC
Git commit b8870d02392a65ee5b4607a3df8bf0f7da363f08 by Dmitry Kazakov.
Committed on 30/07/2019 at 14:16.
Pushed by dkazakov into branch 'master'.

Make KisShortcutMatcher be more tolerant to recursive entering

Some tools, e.g. text tool, may open a dialog right inside
beginPrimaryAction() callback. It may make KisShortcutMatcher crazy,
because all the modal dialogs have hey own event loop, therefore
the state machine of the shortcuts matcher will be broken.

This patch makes the matcher a bit more tolerant to such faults. It
just manually checks if it is entered more that once, and resets the
action in case a recursion is detected.
Related: bug 409968, bug 409275

M  +168  -30   libs/ui/input/kis_shortcut_matcher.cpp
M  +1    -0    libs/ui/input/kis_shortcut_matcher.h

https://invent.kde.org/kde/krita/commit/b8870d02392a65ee5b4607a3df8bf0f7da363f08
Comment 19 Dmitry Kazakov 2019-07-30 15:32:06 UTC
Git commit 008503fb5c5590cfe74c73c1e1a76b26a944e309 by Dmitry Kazakov.
Committed on 30/07/2019 at 14:16.
Pushed by dkazakov into branch 'master'.

Make shape painting tools unblocking (use strokes)

Opening a waiting dialog may make the shortcuts matcher unhappy,
so we should avoid that.
Related: bug 409968, bug 409275

M  +3    -4    libs/ui/tool/kis_tool_shape.cc
M  +1    -2    plugins/tools/basictools/kis_tool_ellipse.cc
M  +42   -25   plugins/tools/basictools/kis_tool_gradient.cc
M  +1    -3    plugins/tools/basictools/kis_tool_rectangle.cc
M  +0    -2    plugins/tools/tool_polygon/kis_tool_polygon.cc
M  +0    -3    plugins/tools/tool_polyline/kis_tool_polyline.cc

https://invent.kde.org/kde/krita/commit/008503fb5c5590cfe74c73c1e1a76b26a944e309
Comment 20 Dmitry Kazakov 2019-07-30 15:33:19 UTC

*** This bug has been marked as a duplicate of bug 409275 ***
Comment 21 Halla Rempt 2019-07-31 08:42:11 UTC
Git commit df7f7a9ac7e49a44ef83062c19a3d62510a0ad49 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 31/07/2019 at 08:39.
Pushed by rempt into branch 'krita/4.2'.

Make shape painting tools unblocking (use strokes)

Opening a waiting dialog may make the shortcuts matcher unhappy,
so we should avoid that.
Related: bug 409968, bug 409275

M  +3    -4    libs/ui/tool/kis_tool_shape.cc
M  +1    -2    plugins/tools/basictools/kis_tool_ellipse.cc
M  +42   -25   plugins/tools/basictools/kis_tool_gradient.cc
M  +1    -3    plugins/tools/basictools/kis_tool_rectangle.cc
M  +0    -2    plugins/tools/tool_polygon/kis_tool_polygon.cc
M  +0    -3    plugins/tools/tool_polyline/kis_tool_polyline.cc

https://invent.kde.org/kde/krita/commit/df7f7a9ac7e49a44ef83062c19a3d62510a0ad49
Comment 22 Halla Rempt 2019-07-31 08:42:11 UTC
Git commit dc6bf17a96556c930f63e4cfbd42591f79987573 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 31/07/2019 at 08:39.
Pushed by rempt into branch 'krita/4.2'.

Make KisShortcutMatcher be more tolerant to recursive entering

Some tools, e.g. text tool, may open a dialog right inside
beginPrimaryAction() callback. It may make KisShortcutMatcher crazy,
because all the modal dialogs have hey own event loop, therefore
the state machine of the shortcuts matcher will be broken.

This patch makes the matcher a bit more tolerant to such faults. It
just manually checks if it is entered more that once, and resets the
action in case a recursion is detected.
Related: bug 409968, bug 409275

M  +168  -30   libs/ui/input/kis_shortcut_matcher.cpp
M  +1    -0    libs/ui/input/kis_shortcut_matcher.h

https://invent.kde.org/kde/krita/commit/dc6bf17a96556c930f63e4cfbd42591f79987573