[krita] [Bug 441605] Safe assert on reading a file with a layer style

2023-01-27 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

--- Comment #9 from amyspark  ---
Git commit 8e83efca125a263dc993cf92e89c290f9339efe3 by L. E. Segovia.
Committed on 28/01/2023 at 01:31.
Pushed by lsegovia into branch 'krita/5.1'.

KisAslLayerStyleSerializer: fix layer-local patterns

This is the counterpart of bug 441605, we only found this one out
because in 464700 Wolthera injects a placeholder pattern, which in turn
was never put into global storage.

For the sake of completionism, I've added several safe asserts in the
path that the nullptr makes, so that we get breakpointable warnings for
missing resources in the future.
Related: bug 464700
CCMAIL:dimul...@gmail.com
CCMAIL:tamtamy.tym...@gmail.com
(cherry picked from commit 973acffa8a24c640e3a3c95007f99dfe4b4f5f48)

M  +15   -5libs/image/kis_asl_layer_style_serializer.cpp
M  +2-0libs/image/layerstyles/kis_ls_utils.cpp
M  +5-0libs/resources/KisLocalStrokeResources.cpp
M  +6-0libs/resources/KisRequiredResourcesOperators.cpp
M  +1-0libs/resources/KoResourceLoadResult.cpp
M  +8-0plugins/impex/psd/psd_loader.cpp

https://invent.kde.org/graphics/krita/commit/8e83efca125a263dc993cf92e89c290f9339efe3

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2023-01-27 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

--- Comment #8 from amyspark  ---
Git commit 973acffa8a24c640e3a3c95007f99dfe4b4f5f48 by L. E. Segovia.
Committed on 28/01/2023 at 01:29.
Pushed by lsegovia into branch 'master'.

KisAslLayerStyleSerializer: fix layer-local patterns

This is the counterpart of bug 441605, we only found this one out
because in 464700 Wolthera injects a placeholder pattern, which in turn
was never put into global storage.

For the sake of completionism, I've added several safe asserts in the
path that the nullptr makes, so that we get breakpointable warnings for
missing resources in the future.
Related: bug 464700
CCMAIL:dimul...@gmail.com
CCMAIL:tamtamy.tym...@gmail.com

M  +15   -5libs/image/kis_asl_layer_style_serializer.cpp
M  +2-0libs/image/layerstyles/kis_ls_utils.cpp
M  +5-0libs/resources/KisLocalStrokeResources.cpp
M  +6-0libs/resources/KisRequiredResourcesOperators.cpp
M  +1-0libs/resources/KoResourceLoadResult.cpp
M  +8-0plugins/impex/psd/psd_loader.cpp

https://invent.kde.org/graphics/krita/commit/973acffa8a24c640e3a3c95007f99dfe4b4f5f48

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2023-01-27 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

amyspark  changed:

   What|Removed |Added

 Blocks||464700


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=464700
[Bug 464700] krita quits opening a specific psd file created with photopea.
-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-21 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

amyspark  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
   |hics/krita/commit/885e62a63 |hics/krita/commit/222f78144
   |383e5117a158b3c6601c910ce21 |82ca797148b757566dc153fcc25
   |b2e6|5d5a

--- Comment #7 from amyspark  ---
Git commit 222f7814482ca797148b757566dc153fcc255d5a by L. E. Segovia.
Committed on 21/10/2021 at 13:12.
Pushed by lsegovia into branch 'krita/5.0'.

KisAslLayerStyleSerializer: fix layer-local gradients load

In 2d426ac0b57ad8595a01b0c82d18633e4ec6060b, @dkazakov refactored the
load so that layer styles would insert their resources on global storage
instead of keeping them in their local stashes. However, this did not
take in account that layers can also have locally defined e.g.
gradients. These will not be found if the resource interface is
overriden because they are resident on the root layer's
localStrokeStorage.

Upon a complete review of the code, the true reason for this failure
lied not only in the (in)validity of the layer style, which I fixed in a
previous commit, but also on the fact that gradients and patterns are
uploaded *before* they are read (!!), in the embedded pattern
registration loop.

This commit fixes that by moving the two upload loops to inside the
layer style deserialization, and making sure they upload only missing
resources (to avoid accidentally quadratic behaviour).
CCMAIL: dimul...@gmail.com
CCMAIL: tamtamy.tym...@gmail.com
(cherry picked from commit 885e62a63383e5117a158b3c6601c910ce21b2e6)

M  +4-0libs/image/kis_asl_layer_style_serializer.cpp
M  +20   -16   plugins/impex/psd/psd_loader.cpp

https://invent.kde.org/graphics/krita/commit/222f7814482ca797148b757566dc153fcc255d5a

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-21 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

--- Comment #6 from amyspark  ---
Git commit 04c87c696878503fb359ab5e4ff20a65c83db58e by L. E. Segovia.
Committed on 21/10/2021 at 13:11.
Pushed by lsegovia into branch 'krita/5.0'.

KisPSDLayerStyle: ensure users of saveToDevice assert
(cherry picked from commit 0e13f684c3e0c14b461a678ae0a61804ef0dccab)

M  +2-3libs/image/kis_psd_layer_style.cpp

https://invent.kde.org/graphics/krita/commit/04c87c696878503fb359ab5e4ff20a65c83db58e

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-21 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

amyspark  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap
   |hics/krita/commit/6039f5b45 |hics/krita/commit/885e62a63
   |aad719625e22de38afdfd643214 |383e5117a158b3c6601c910ce21
   |1ee1|b2e6

--- Comment #5 from amyspark  ---
Git commit 885e62a63383e5117a158b3c6601c910ce21b2e6 by L. E. Segovia.
Committed on 21/10/2021 at 13:07.
Pushed by lsegovia into branch 'master'.

KisAslLayerStyleSerializer: fix layer-local gradients load

In 2d426ac0b57ad8595a01b0c82d18633e4ec6060b, @dkazakov refactored the
load so that layer styles would insert their resources on global storage
instead of keeping them in their local stashes. However, this did not
take in account that layers can also have locally defined e.g.
gradients. These will not be found if the resource interface is
overriden because they are resident on the root layer's
localStrokeStorage.

Upon a complete review of the code, the true reason for this failure
lied not only in the (in)validity of the layer style, which I fixed in a
previous commit, but also on the fact that gradients and patterns are
uploaded *before* they are read (!!), in the embedded pattern
registration loop.

This commit fixes that by moving the two upload loops to inside the
layer style deserialization, and making sure they upload only missing
resources (to avoid accidentally quadratic behaviour).
CCMAIL: dimul...@gmail.com
CCMAIL: tamtamy.tym...@gmail.com

M  +4-0libs/image/kis_asl_layer_style_serializer.cpp
M  +19   -16   plugins/impex/psd/psd_loader.cpp

https://invent.kde.org/graphics/krita/commit/885e62a63383e5117a158b3c6601c910ce21b2e6

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-21 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

--- Comment #4 from amyspark  ---
Git commit 0e13f684c3e0c14b461a678ae0a61804ef0dccab by L. E. Segovia.
Committed on 21/10/2021 at 13:07.
Pushed by lsegovia into branch 'master'.

KisPSDLayerStyle: ensure users of saveToDevice assert

M  +2-3libs/image/kis_psd_layer_style.cpp

https://invent.kde.org/graphics/krita/commit/0e13f684c3e0c14b461a678ae0a61804ef0dccab

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-18 Thread Halla Rempt
https://bugs.kde.org/show_bug.cgi?id=441605

Halla Rempt  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/grap
   ||hics/krita/commit/6039f5b45
   ||aad719625e22de38afdfd643214
   ||1ee1

--- Comment #3 from Halla Rempt  ---
Git commit 6039f5b45aad719625e22de38afdfd6432141ee1 by Halla Rempt, on behalf
of L. E. Segovia.
Committed on 18/10/2021 at 11:11.
Pushed by rempt into branch 'master'.

psd: mark read layer styles as valid

M  +1-0plugins/impex/psd/psd_loader.cpp

https://invent.kde.org/graphics/krita/commit/6039f5b45aad719625e22de38afdfd6432141ee1

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-17 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=441605

--- Comment #2 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/krita/-/merge_requests/1101

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

[krita] [Bug 441605] Safe assert on reading a file with a layer style

2021-10-17 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=441605

amyspark  changed:

   What|Removed |Added

   Assignee|krita-bugs-n...@kde.org |a...@amyspark.me
 Status|REPORTED|ASSIGNED
 CC||a...@amyspark.me
 Ever confirmed|0   |1

--- Comment #1 from amyspark  ---
Cannot reproduce on 5.1.0-prealpha 804225bc51, which I guess is because of my
reworked loading of PSD resource blocks. However, I did find that layer styles
are never set as valid, so the end result is the same-- layer styles present
but not loaded.

Assigning to myself.

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