Bug 417673 - Visible tiling artifacts from Filter Masks
Summary: Visible tiling artifacts from Filter Masks
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Filter Layers (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-14 21:50 UTC by M
Modified: 2020-02-25 11:54 UTC (History)
2 users (show)

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


Attachments
Example document (378.19 KB, application/x-krita)
2020-02-14 21:53 UTC, M
Details
GDB backtrace (24.43 KB, text/plain)
2020-02-14 22:05 UTC, M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M 2020-02-14 21:50:19 UTC
SUMMARY
Tiling artifacts can appear on the rendered image when using a convolution type filter on a Filter Mask. Interestingly, the same artifacts don't seem to appear if a Filter Layer is used instead, and even mitigate the artifacts if the Filter Layer is placed on top of the Filter Masks.

I'll attach a small test document.

STEPS TO REPRODUCE
1. Open the test file.
2. Repeatedly hide and unhide the Fill Layer on the bottom of the stack and wait for the recalculated render.

OBSERVED RESULT
There will be visual artifacts at the edges of the render tiles, different each time, depending on when exactly the tiles complete.

EXPECTED RESULT
No such artifacts.

SOFTWARE/OS VERSIONS
Tested in 4.2.8, most recent Next AppImage, and Dmitry's fix-deadlock-on-loading-415891 branch.
Comment 1 M 2020-02-14 21:53:12 UTC
Created attachment 126043 [details]
Example document
Comment 2 M 2020-02-14 22:05:46 UTC
Created attachment 126044 [details]
GDB backtrace

I can consistently provoke a crash on the build from Dmitry's branch, by adding a Filter Layer to the example document and choosing Gaussian Highpass. Doesn't seem to crash on 4.2.8 or most recent Next AppImage. I'll attach my backtrace.
Comment 3 Halla Rempt 2020-02-17 14:41:54 UTC
Hi,

If you have the crash still now Dmitry's branch has been merged, please make a separate bug for that. I can confirm the artefacts.
Comment 4 M 2020-02-18 01:37:50 UTC
No, I can't reproduce the crash in master (git 9643b51) nor the latest stable AppImage anymore, with any of the filters. I realize now Gaussian Highpass isn't actually supposed to be in 4.2, it might have been residue from previous builds since I didn't do a clean one. In which case sorry for the false alarm :(
Comment 5 Dmitry Kazakov 2020-02-24 17:59:22 UTC
Okay, since there is no crash it is not a release blocker :)
Comment 6 Dmitry Kazakov 2020-02-24 18:09:57 UTC
Okay, the problem happens because "Motion Blur" mask is applied to a "Filter Layer" with color balance filter attached. I don't think such combination has ever been tested :) Though it should be fixed, yes.
Comment 7 Dmitry Kazakov 2020-02-25 11:37:08 UTC
Git commit 8157bb3ce895c93585449e871821bddd87570484 by Dmitry Kazakov.
Committed on 25/02/2020 at 11:36.
Pushed by dkazakov into branch 'master'.

Fix artifacts on filter masks applied to adjustment layers

It looks like there was just a misprint in the way how need rect is
calculated.

M  +2    -2    libs/image/kis_adjustment_layer.cc
M  +6    -0    libs/image/kis_image_config.cpp
M  +2    -0    libs/image/kis_image_config.h
A  +-    --    libs/image/tests/data/async_merger_test/mask_on_adj_initial.png
M  +61   -0    libs/image/tests/kis_async_merger_test.cpp
M  +4    -0    libs/image/tests/kis_async_merger_test.h

https://invent.kde.org/kde/krita/commit/8157bb3ce895c93585449e871821bddd87570484
Comment 8 Dmitry Kazakov 2020-02-25 11:54:20 UTC
Git commit 816f481095d920607e6196250f6c9795ef024592 by Dmitry Kazakov.
Committed on 25/02/2020 at 11:39.
Pushed by dkazakov into branch 'krita/4.2'.

Fix artifacts on filter masks applied to adjustment layers

It looks like there was just a misprint in the way how need rect is
calculated.

M  +2    -2    libs/image/kis_adjustment_layer.cc
M  +6    -0    libs/image/kis_image_config.cpp
M  +2    -0    libs/image/kis_image_config.h
A  +-    --    libs/image/tests/data/async_merger_test/mask_on_adj_initial.png
M  +61   -0    libs/image/tests/kis_async_merger_test.cpp
M  +4    -0    libs/image/tests/kis_async_merger_test.h

https://invent.kde.org/kde/krita/commit/816f481095d920607e6196250f6c9795ef024592