Bug 488800 - Clearing scratchpad while brush is lagging crashes Krita
Summary: Clearing scratchpad while brush is lagging crashes Krita
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.2.2
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 16:50 UTC by AndrejPavlovic84
Modified: 2024-10-24 12:12 UTC (History)
2 users (show)

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


Attachments
Crash dump (7.54 KB, text/plain)
2024-06-20 16:50 UTC, AndrejPavlovic84
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AndrejPavlovic84 2024-06-20 16:50:07 UTC
Created attachment 170689 [details]
Crash dump

SUMMARY
When using a performance intensive brush and drawing in the scratchpad, if the stroke is lagging behind, clearing the scratchpad will cause Krita to crash to desktop.

STEPS TO REPRODUCE
1. Use a performance intensive brush. Increasing size and enabling smudge should be enough to make the stroke lag behind.
2. Open the brush editor and start drawing in the scratchpad.
3. While the stroke is lagging behind, press the button to clear the scratchpad.

OBSERVED RESULT
Krita crashes to desktop.

EXPECTED RESULT
Scratchpad should be clear and not crash to desktop.

SOFTWARE/OS VERSIONS
Arch Linux 6.6.33-1-lts using X11
Krita 5.2.2-10 (repository)

ADDITIONAL INFORMATION
Bug has been tested and reproduced in 5.2.3-beta1 (appimage). Unknown if it also affects other platforms.
Probably easier to reproduce on a slower system. 
Video of the bug is available on the forum thread:
https://krita-artists.org/t/bug-clearing-scratchpad-while-brush-is-lagging-crashes-krita/94260
Comment 1 Dmitry Kazakov 2024-10-22 13:59:48 UTC
Git commit 1b1422e09a9378a4c1763c41ad895eba299c7264 by Dmitry Kazakov.
Committed on 22/10/2024 at 13:59.
Pushed by dkazakov into branch 'master'.

[string freeze exception] Fix a crash when trying to clear scrapad while it is busy

M  +5    -0    libs/ui/kis_async_action_feedback.cpp
M  +24   -0    libs/ui/kis_async_action_feedback.h
M  +154  -71   libs/ui/widgets/kis_scratch_pad.cpp

https://invent.kde.org/graphics/krita/-/commit/1b1422e09a9378a4c1763c41ad895eba299c7264
Comment 2 Dmitry Kazakov 2024-10-24 12:12:19 UTC
Git commit 29c864fe540b918a5b9fd5d86426f81bbbcf8d16 by Dmitry Kazakov.
Committed on 24/10/2024 at 12:11.
Pushed by dkazakov into branch 'krita/5.2'.

[string freeze exception] Fix a crash when trying to clear scrapad while it is busy
CC:kimageshop@kde.org
CC:kde-i18n-doc@kde.org

M  +5    -0    libs/ui/kis_async_action_feedback.cpp
M  +24   -0    libs/ui/kis_async_action_feedback.h
M  +113  -41   libs/ui/widgets/kis_scratch_pad.cpp

https://invent.kde.org/graphics/krita/-/commit/29c864fe540b918a5b9fd5d86426f81bbbcf8d16