Bug 398788 - Layer Style projection plane Error on save
Summary: Layer Style projection plane Error on save
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 11:07 UTC by tkp
Modified: 2018-09-24 07:25 UTC (History)
1 user (show)

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


Attachments
Simplified file triggering the error (425.14 KB, application/zip)
2018-09-18 11:07 UTC, tkp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tkp 2018-09-18 11:07:36 UTC
Created attachment 115063 [details]
Simplified file triggering the error

Hi,

using Krita nightly-8ec26ec, saving an old file created with Krita 3.3 triggers this error on save :

  Krita has encountered an internal error:
  SAFE ASSERT (krita): "rhs.m_d->layerStyleProjectionPlane" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/image/kis_layer.cc, line 265
  Please report a bug to developers!

  Press Ignore to try to continue.
  Press Abort to see developers information (all unsaved data will be lost)

Could not re-create a problematic file with latest Krita. The attached file is a simplified version of the original 3.3 file.

As the message suggest, it seems to be linked to layer styles :
- all the error seem triggered by group layers with no styles
- those which had a style but disabled don't seem to trigger
- creating a new group layer with no style don't trigger the error
- enabling layer style + a style, and then disabling, seem to "cure" a problematic layer

So indeed it looks like these group layers have problematic data in their style.

Not sure if retro-compatibility with 3.3 files is a goal, and it's easy to "repair" a file, but maybe something worth a check anyway ?

Have a nice day !
Comment 1 Halla Rempt 2018-09-18 11:34:58 UTC
No, older files shouldn't trigger errors. But curiously, your simplified.kra doesn't trigger the assert with my current test build.
Comment 2 Dmitry Kazakov 2018-09-18 14:28:34 UTC
Git commit dc44b077df617f3ea99442cfb6945c8712476b52 by Dmitry Kazakov.
Committed on 18/09/2018 at 14:28.
Pushed by dkazakov into branch 'master'.

Remove a spurious assert in layer cloning

Not having a layer style projection plane is a
normal situation when the style is empty

M  +0    -2    libs/image/kis_layer.cc

https://commits.kde.org/krita/dc44b077df617f3ea99442cfb6945c8712476b52
Comment 3 tkp 2018-09-18 17:48:54 UTC
Fix confirmed, thanks Dmitry, a present in each daily ! :)
Comment 4 Halla Rempt 2018-09-24 07:25:13 UTC
Git commit 0ac2f742c1d07ffd6e98e38b3357dad755a78c7d by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 24/09/2018 at 06:57.
Pushed by rempt into branch 'krita/4.1'.

Remove a spurious assert in layer cloning

Not having a layer style projection plane is a
normal situation when the style is empty

M  +0    -2    libs/image/kis_layer.cc

https://commits.kde.org/krita/0ac2f742c1d07ffd6e98e38b3357dad755a78c7d