Bug 475385 - Pasting a transform mask crashes Krita immediately
Summary: Pasting a transform mask crashes Krita immediately
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-08 20:18 UTC by Ralek Kolemios
Modified: 2024-02-28 18:09 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralek Kolemios 2023-10-08 20:18:47 UTC
If you select a transform mask on any layer, copy it, and attempt to paste it on a different layer, Krita immediately crashes.

Version: 5.3.0-prealpha (git 27302a3)
Comment 1 Bug Janitor Service 2023-10-13 09:26:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1958
Comment 2 Dmitry Kazakov 2023-10-23 15:09:24 UTC
Git commit fd4b9fe47e67f91858d846f93d9ace53419d94eb by Dmitry Kazakov.
Committed on 23/10/2023 at 17:08.
Pushed by dkazakov into branch 'master'.

WIP: Refactor transform masks not to discard keyframe channels on every change

The patch fixes the weird design of the transform masks. Before the patch
KisAnimatedTransformMaskParameters were replaced on every transform mask
change, which also replaced the keyframe channels. Which means that
every undo operation would just **delete** the keyframe channels
linked inside the node itself.

In the new design KisAnimatedTransformMaskParameters is never replaced
(it is actually planned to rename it into KisTransformMaskParametersHolder
or something like that). The holder just stores keyframe channels and
the params and just returnes the proper paraps when requested (by fetching
some information from the keyframe channels).

A  +111  -0    libs/command/KisChangeValueCommand.h  *
M  +1    -0    libs/image/CMakeLists.txt
A  +70   -0    libs/image/commands_new/KisLazyCreateTransformMaskKeyframesCommand.cpp     [License: GPL(v2.0+)]
A  +26   -0    libs/image/commands_new/KisLazyCreateTransformMaskKeyframesCommand.h     [License: GPL(v2.0+)]
M  +40   -14   libs/image/commands_new/KisSimpleModifyTransformMaskCommand.cpp
M  +10   -2    libs/image/commands_new/KisSimpleModifyTransformMaskCommand.h
M  +34   -0    libs/image/kis_keyframe_channel.cpp
M  +2    -0    libs/image/kis_keyframe_channel.h
M  +20   -0    libs/image/kis_lod_capable_layer_offset.h
M  +89   -53   libs/image/kis_transform_mask.cpp
M  +2    -0    libs/image/kis_transform_mask.h
M  +2    -17   libs/image/kis_transform_mask_params_factory_registry.cpp
M  +4    -7    libs/image/kis_transform_mask_params_factory_registry.h
M  +0    -9    libs/image/kis_transform_mask_params_interface.cpp
M  +23   -9    libs/image/kis_transform_mask_params_interface.h
M  +1    -1    libs/image/processing/kis_transform_processing_visitor.cpp
M  +15   -9    libs/libkis/TransformMask.cpp
M  +16   -19   libs/ui/tool/strokes/move_stroke_strategy.cpp
M  +4    -1    plugins/impex/libkra/kis_kra_load_visitor.cpp
M  +0    -1    plugins/tools/tool_transform2/CMakeLists.txt
M  +189  -356  plugins/tools/tool_transform2/kis_animated_transform_parameters.cpp
M  +13   -32   plugins/tools/tool_transform2/kis_animated_transform_parameters.h
D  +0    -70   plugins/tools/tool_transform2/kis_modify_transform_mask_command.cpp
D  +0    -41   plugins/tools/tool_transform2/kis_modify_transform_mask_command.h
M  +0    -13   plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp
M  +0    -3    plugins/tools/tool_transform2/kis_transform_mask_adapter.h
M  +23   -36   plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp
M  +25   -34   plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +10   -15   plugins/tools/tool_transform2/tests/test_animated_transform_parameters.cpp

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/graphics/krita/-/commit/fd4b9fe47e67f91858d846f93d9ace53419d94eb
Comment 3 Dmitry Kazakov 2024-02-28 18:09:29 UTC
Git commit d454ef3cc9f2704122239a109d26d9512ff127bc by Dmitry Kazakov.
Committed on 28/02/2024 at 12:40.
Pushed by dkazakov into branch 'kazakov/for-5.2'.

WIP: Refactor transform masks not to discard keyframe channels on every change

The patch fixes the weird design of the transform masks. Before the patch
KisAnimatedTransformMaskParameters were replaced on every transform mask
change, which also replaced the keyframe channels. Which means that
every undo operation would just **delete** the keyframe channels
linked inside the node itself.

In the new design KisAnimatedTransformMaskParameters is never replaced
(it is actually planned to rename it into KisTransformMaskParametersHolder
or something like that). The holder just stores keyframe channels and
the params and just returnes the proper paraps when requested (by fetching
some information from the keyframe channels).

A  +111  -0    libs/command/KisChangeValueCommand.h  *
M  +1    -0    libs/image/CMakeLists.txt
A  +70   -0    libs/image/commands_new/KisLazyCreateTransformMaskKeyframesCommand.cpp     [License: GPL(v2.0+)]
A  +26   -0    libs/image/commands_new/KisLazyCreateTransformMaskKeyframesCommand.h     [License: GPL(v2.0+)]
M  +40   -14   libs/image/commands_new/KisSimpleModifyTransformMaskCommand.cpp
M  +10   -2    libs/image/commands_new/KisSimpleModifyTransformMaskCommand.h
M  +34   -0    libs/image/kis_keyframe_channel.cpp
M  +2    -0    libs/image/kis_keyframe_channel.h
M  +20   -0    libs/image/kis_lod_capable_layer_offset.h
M  +89   -53   libs/image/kis_transform_mask.cpp
M  +2    -0    libs/image/kis_transform_mask.h
M  +2    -17   libs/image/kis_transform_mask_params_factory_registry.cpp
M  +4    -7    libs/image/kis_transform_mask_params_factory_registry.h
M  +0    -9    libs/image/kis_transform_mask_params_interface.cpp
M  +23   -9    libs/image/kis_transform_mask_params_interface.h
M  +1    -1    libs/image/processing/kis_transform_processing_visitor.cpp
M  +15   -9    libs/libkis/TransformMask.cpp
M  +16   -19   libs/ui/tool/strokes/move_stroke_strategy.cpp
M  +4    -1    plugins/impex/libkra/kis_kra_load_visitor.cpp
M  +0    -1    plugins/tools/tool_transform2/CMakeLists.txt
M  +189  -356  plugins/tools/tool_transform2/kis_animated_transform_parameters.cpp
M  +13   -32   plugins/tools/tool_transform2/kis_animated_transform_parameters.h
D  +0    -70   plugins/tools/tool_transform2/kis_modify_transform_mask_command.cpp
D  +0    -41   plugins/tools/tool_transform2/kis_modify_transform_mask_command.h
M  +0    -13   plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp
M  +0    -3    plugins/tools/tool_transform2/kis_transform_mask_adapter.h
M  +23   -36   plugins/tools/tool_transform2/strokes/inplace_transform_stroke_strategy.cpp
M  +25   -34   plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +10   -15   plugins/tools/tool_transform2/tests/test_animated_transform_parameters.cpp

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://invent.kde.org/graphics/krita/-/commit/d454ef3cc9f2704122239a109d26d9512ff127bc