Bug 438327 - Hangup when transforming too big vector selection with inplace transform mode
Summary: Hangup when transforming too big vector selection with inplace transform mode
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Microsoft Windows Other
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-09 13:57 UTC by Dmitry Kazakov
Modified: 2021-06-11 11:09 UTC (History)
0 users

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


Attachments
stacktrace (12.77 KB, text/plain)
2021-06-09 13:57 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2021-06-09 13:57:01 UTC
Created attachment 139142 [details]
stacktrace

STEPS TO REPRODUCE
1. Create a 7000x4000 image
2. Create a vector selection (rectangular)
3. Try to transform it. 
4. Press Esc key while transforming
Comment 1 Dmitry Kazakov 2021-06-10 13:42:53 UTC
Git commit dfd9e0aa1ff2341d1efc9eb49882e96e215533b9 by Dmitry Kazakov.
Committed on 10/06/2021 at 13:42.
Pushed by dkazakov into branch 'master'.

Fix a deadlock when cancelling inplace transform of a vector selection

See a long comment in KisSelection::Private::safeDeleteShapeSelection

M  +50   -2    libs/image/kis_selection.cc

https://invent.kde.org/graphics/krita/commit/dfd9e0aa1ff2341d1efc9eb49882e96e215533b9
Comment 2 Dmitry Kazakov 2021-06-10 13:43:01 UTC
Git commit 2c2907b0b496a37d0ec8da2fdc59884e6f581e2a by Dmitry Kazakov.
Committed on 10/06/2021 at 13:42.
Pushed by dkazakov into branch 'master'.

Fix updates on cancelling transformation right after confirming that with Enter key

There were two problems:

1) We don't need recursion avoidance in the inplace transform mode
   (using finalizingActionsStarted). The strokes queue cancels the
   finishing jobs, so we should do a full featured cancel with all
   the undo in place

2) KisHoldUIUpdatesCommand should be added into the stroke's local
   queue, not into KisStrokeJobUndoCommandBased's one. Otherwise they
   will be reordered on finishing.

M  +33   -54   plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp
M  +1    -1    plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.h

https://invent.kde.org/graphics/krita/commit/2c2907b0b496a37d0ec8da2fdc59884e6f581e2a
Comment 3 Dmitry Kazakov 2021-06-10 13:43:09 UTC
Git commit 7ae3f95322c6bdf6de8ace2451d77380c3f81143 by Dmitry Kazakov.
Committed on 10/06/2021 at 13:42.
Pushed by dkazakov into branch 'master'.

Fix continued transform when the transformation has been cancelled after completion

M  +1    -0    plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp

https://invent.kde.org/graphics/krita/commit/7ae3f95322c6bdf6de8ace2451d77380c3f81143
Comment 4 Dmitry Kazakov 2021-06-11 11:09:14 UTC
Git commit e7b525d81bbcbdb613b5179cbc6672e9049eb43d by Dmitry Kazakov.
Committed on 11/06/2021 at 11:08.
Pushed by dkazakov into branch 'master'.

Fix unbalanced HoldUIUpdates in Transform Tool

We should do all image manipulations on the image inside the
transform stroke using undo commands. It is the only way to guarantee
that the locking/unlocking will be handled properly on stroke
cancellation.

M  +1    -0    libs/image/CMakeLists.txt
A  +25   -0    libs/image/commands_new/KisDisableDirtyRequestsCommand.cpp     [License: GPL(v2.0+)]
A  +27   -0    libs/image/commands_new/KisDisableDirtyRequestsCommand.h     [License: GPL(v2.0+)]
M  +68   -40   plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp
M  +2    -2    plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.h

https://invent.kde.org/graphics/krita/commit/e7b525d81bbcbdb613b5179cbc6672e9049eb43d