https://bugs.kde.org/show_bug.cgi?id=456470

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
                   |hics/krita/commit/2898ffe4a |hics/krita/commit/75393eba4
                   |b4dfaf1ddf810fe04f1209624b7 |070e225f26d9f4afdbd7d624196
                   |eb4c                        |0d5a

--- Comment #12 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit 75393eba4070e225f26d9f4afdbd7d6241960d5a by Dmitry Kazakov.
Committed on 11/08/2022 at 13:44.
Pushed by dkazakov into branch 'krita/5.1'.

Fix a crash in undo stask

The crash happened between the consurrent access to the stack from two
actors:

1) One stroke adding its command to the undo stack and calling
   KUndo2QStack::checkUndoLimit() to purge the oldest command
   of the stack to satisfy the undo stack limit.

2) The user starting the new stroke, which calls
   KUndo2QStack::purgeRedoState() from the GUI thread in a non-
   synchronized way.

Obviously, the crash happens only when the undo stack limit is
reached. Otherwise both the functions do nothing and no crash
happens.

The fix of the bug just moves the call to purgeRedoState() from
the point when a stroke is added into the queue to a point when
the stroke is actually started by the queue.

Huge thanks to @mako and @acc4 from Krita Artists for their help
with testing all my packages and tracking the crash down :)

M  +5    -10   libs/image/kis_image.cc
M  +5    -0    libs/image/kis_stroke.cpp
M  +1    -0    libs/image/kis_stroke.h
M  +29   -8    libs/image/kis_strokes_queue.cpp
M  +1    -0    libs/image/kis_strokes_queue.h
M  +5    -0    libs/image/kis_update_scheduler.cpp
M  +7    -0    libs/image/kis_update_scheduler.h

https://invent.kde.org/graphics/krita/commit/75393eba4070e225f26d9f4afdbd7d6241960d5a

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to