Bug 492320 - krita 5.2.3 can't open the file i saved in an old version (including 5.1.5)
Summary: krita 5.2.3 can't open the file i saved in an old version (including 5.1.5)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 5.2.3
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
: 486877 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-08-28 14:07 UTC by 112358asdfg
Modified: 2024-09-09 08:27 UTC (History)
2 users (show)

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


Attachments
the auto-saved file before update and the final version of the drawing (3.91 MB, application/x-7z-compressed)
2024-08-28 14:10 UTC, 112358asdfg
Details
part 2 (3.91 MB, application/octet-stream)
2024-08-28 14:12 UTC, 112358asdfg
Details
part 3 (1.05 MB, application/octet-stream)
2024-08-28 14:12 UTC, 112358asdfg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 112358asdfg 2024-08-28 14:07:55 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY

krita 5.2.3 can't open the file i saved in an older version (including 5.1.5)
old version(maybe 5.1.x or 5.0.x) is slow and takes up 10%~20% of CPU usage when opened the file, so i want to update it.
after the new version(5.2.3) installed , it cannot open the saved and auto-saved files.
and i downloaded the krita-x64-5.1.5 and unzipped to a folder on my desktop and it can open the saved file.
after i finisned work on this file, the final version saved also cannot be opened by 5.2.3.

the auto-saved file before update and the final version will be attached

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
a window displays the error message:
无法打开 C:\Users\sodiu\Desktop\AAA.kra。
未知错误。
无法创建变形蒙版参数
无法创建变形蒙版参数
无法创建变形蒙版参数


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: Windows 11 家庭中文版 23h2 22631.4037
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
the text which the "report bug" window wants me to paste:
attached in the 7z file
Comment 1 112358asdfg 2024-08-28 14:10:52 UTC
Created attachment 173041 [details]
the auto-saved file before update and the final version of the drawing
Comment 2 112358asdfg 2024-08-28 14:12:12 UTC
Created attachment 173042 [details]
part 2
Comment 3 112358asdfg 2024-08-28 14:12:52 UTC
Created attachment 173043 [details]
part 3
Comment 4 Dmitry Kazakov 2024-08-29 09:15:08 UTC
Upgrading to a dataloss bug
Comment 5 Bug Janitor Service 2024-08-29 11:27:37 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2228
Comment 6 Dmitry Kazakov 2024-09-04 13:20:39 UTC
Hi, 123asdf!

Could you please check if this Krita build opens your file correctly? Please pay close attention to the position of the transformation masks that were created for offset only.

https://invent.kde.org/graphics/krita/-/jobs/2098635/artifacts/raw/krita-x64-5.3.0-prealpha-50c0f3c5.zip
Comment 7 Dmitry Kazakov 2024-09-05 11:41:41 UTC
Git commit b3f0ad41d5a1677b8a2821a6b7e7ce16aae27cd2 by Dmitry Kazakov.
Committed on 05/09/2024 at 11:37.
Pushed by dkazakov into branch 'master'.

Fix infinite loop with combination of clone + transform-mask-on-source

Some tricky combination of transform masks and clone layers could
cause an infinite loop, e.g. this one:

+-----------------+
|root             |
|  clone_of_p1 -+ |
|  paint 2      | |
|  paint 1    <-+ |
|    transf1      |
+-----------------+

When a clone layer is updated, it may request recalculation of the
source layer in the areas outside the bounds of the image. This
outside-the-image update could cause the async regeneration of the mask.
And async regeneration of the mask could cause an update of the clone
layer, which would close the infinite loop.

M  +6    -1    libs/image/kis_transform_mask.cpp
M  +6    -1    libs/image/tests/CMakeLists.txt
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_00_initial.png
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_10_transform_mask_initial_static.png
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_20_final.png
M  +110  -0    libs/image/tests/kis_clone_layer_test.cpp
M  +4    -0    libs/image/tests/kis_clone_layer_test.h
M  +39   -109  plugins/tools/tool_transform2/tests/TransformStrokeStrategyTest.cpp
M  +9    -6    sdk/tests/KisDumbTransformMaskParams.cpp
A  +87   -0    sdk/tests/KisTransformMaskTestingListener.h     [License: GPL(v2.0+)]

https://invent.kde.org/graphics/krita/-/commit/b3f0ad41d5a1677b8a2821a6b7e7ce16aae27cd2
Comment 8 Dmitry Kazakov 2024-09-05 11:41:49 UTC
Git commit 58bb19c0bff170381682dcf634beb1e50d84e0e9 by Dmitry Kazakov.
Committed on 05/09/2024 at 11:37.
Pushed by dkazakov into branch 'master'.

Make sure that older files with simple transform masks load fine

M  +14   -0    plugins/impex/libkra/kis_kra_load_visitor.cpp
M  +29   -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp
M  +1    -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.h
M  +1    -0    plugins/tools/tool_transform2/tool_transform.cc

https://invent.kde.org/graphics/krita/-/commit/58bb19c0bff170381682dcf634beb1e50d84e0e9
Comment 9 Dmitry Kazakov 2024-09-05 11:45:58 UTC
Git commit a1ea610de2b57a9b8e737c8524da07d790b0d0f9 by Dmitry Kazakov.
Committed on 05/09/2024 at 11:45.
Pushed by dkazakov into branch 'krita/5.2'.

Make sure that older files with simple transform masks load fine

M  +14   -0    plugins/impex/libkra/kis_kra_load_visitor.cpp
M  +29   -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.cpp
M  +1    -0    plugins/tools/tool_transform2/kis_transform_mask_adapter.h
M  +1    -0    plugins/tools/tool_transform2/tool_transform.cc

https://invent.kde.org/graphics/krita/-/commit/a1ea610de2b57a9b8e737c8524da07d790b0d0f9
Comment 10 Dmitry Kazakov 2024-09-05 11:46:06 UTC
Git commit 1d1159b5eaafed77f0d3f86fcf54289f3c1abe9c by Dmitry Kazakov.
Committed on 05/09/2024 at 11:45.
Pushed by dkazakov into branch 'krita/5.2'.

Fix infinite loop with combination of clone + transform-mask-on-source

Some tricky combination of transform masks and clone layers could
cause an infinite loop, e.g. this one:

+-----------------+
|root             |
|  clone_of_p1 -+ |
|  paint 2      | |
|  paint 1    <-+ |
|    transf1      |
+-----------------+

When a clone layer is updated, it may request recalculation of the
source layer in the areas outside the bounds of the image. This
outside-the-image update could cause the async regeneration of the mask.
And async regeneration of the mask could cause an update of the clone
layer, which would close the infinite loop.

M  +6    -1    libs/image/kis_transform_mask.cpp
M  +6    -1    libs/image/tests/CMakeLists.txt
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_00_initial.png
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_10_transform_mask_initial_static.png
A  +-    --    libs/image/tests/data/clone_layer_test/tmask_source_20_final.png
M  +110  -0    libs/image/tests/kis_clone_layer_test.cpp
M  +4    -0    libs/image/tests/kis_clone_layer_test.h
M  +39   -109  plugins/tools/tool_transform2/tests/TransformStrokeStrategyTest.cpp
M  +9    -6    sdk/tests/KisDumbTransformMaskParams.cpp
A  +87   -0    sdk/tests/KisTransformMaskTestingListener.h     [License: GPL(v2.0+)]

https://invent.kde.org/graphics/krita/-/commit/1d1159b5eaafed77f0d3f86fcf54289f3c1abe9c
Comment 11 Dmitry Kazakov 2024-09-05 14:00:20 UTC
*** Bug 486877 has been marked as a duplicate of this bug. ***
Comment 12 112358asdfg 2024-09-09 08:27:38 UTC
(In reply to Dmitry Kazakov from comment #6)
> Hi, 123asdf!
> 
> Could you please check if this Krita build opens your file correctly? Please
> pay close attention to the position of the transformation masks that were
> created for offset only.
> 
> https://invent.kde.org/graphics/krita/-/jobs/2098635/artifacts/raw/krita-x64-
> 5.3.0-prealpha-50c0f3c5.zip

yes, it can open my file correctly