Bug 412488 - Crash when there is multiple-layered group layer with many clone layers in it
Summary: Crash when there is multiple-layered group layer with many clone layers in it
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.2.6
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-30 18:07 UTC by bryanlonghin
Modified: 2020-04-27 21:44 UTC (History)
1 user (show)

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 bryanlonghin 2019-09-30 18:07:50 UTC
SUMMARY
My file has some big group layers (I will call them group layer A for better understanding). In each group layer A, there are 8 group layers (group layer B). In each group layer B, there are 8 clone layers where most of them also have a transform mask.

STEPS TO REPRODUCE
1. Simply toggling visibility of the group layer A can cause crash, but sometimes it doesn't. However, toggling group layer B will not crash.
2. Moving nodes across group layer A.
3. Opening such file will crash.

OBSERVED RESULT
Crash, and seems that it will not generate crash log in kritacrash.

EXPECTED RESULT
older version works smoothly without any crash.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 bryanlonghin 2019-09-30 18:09:32 UTC
the file is too big so it won't allow me to add it as attachment, I can try to install 4.2.6 again and try to create a smaller file and see if I can attach it
Comment 2 Halla Rempt 2019-09-30 18:10:13 UTC
Or maybe make it available through a dropbox link or something like that?
Comment 4 bryanlonghin 2019-09-30 18:21:38 UTC
crash directly when opening it. but I can't reproduce the crash in a new file with the said layer structure.
Comment 5 Halla Rempt 2019-10-01 06:11:23 UTC
Hm, doesn't crash when I try to open it, nor when I toggle any of the group layers. 

I do see 

SAFE ASSERT (krita): "newLod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 659

on the commandline, though. Did you get a popup with similar message when krita crashed for you?
Comment 6 Halla Rempt 2019-10-01 06:14:54 UTC
4.2.6 does crash with:

ASSERT (krita): "m_buffer[currentIndex].loadAcquire() > 0" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/image/tiles3/KisTiledExtentManager.cpp, line 87
Aborted (core dumped)

On the terminal. 

The upcoming 4.2.7 doesn't crash. Could you check with the nightly stable build? See https://binary-factory.kde.org/job/Krita_Stable_Windows_Build/
Comment 7 bryanlonghin 2019-10-01 07:02:35 UTC
sorry, I was sleeping. Okay I will try to download 4.2.7 and see.
Comment 8 Halla Rempt 2019-10-01 07:04:59 UTC
I was up really early today, I'm travelling :-). 4.2.7 is now in beta, we'll release the full version on Thursday.
Comment 9 bryanlonghin 2019-10-01 07:13:20 UTC
I tested it violently and it did not crash. I think 4.2.7 has fixed the issue. Thank you developer!!! Krita 4.2 is great. Keep up the good work :)
Comment 10 Halla Rempt 2019-10-01 07:15:54 UTC
Thanks for testing!
Comment 11 Dmitry Kazakov 2020-04-27 21:42:17 UTC
Git commit 5cff2b6f1dee29b6b0a9ff4aa5064a2efe6dfab4 by Dmitry Kazakov.
Committed on 27/04/2020 at 21:40.
Pushed by dkazakov into branch 'master'.

Fix a threading crash caused by transformation masks

The mask must not access pixels outside its need rect, it breaks
a contract between it and the scheduler. And since affine transformations
use bilinear interpolation, we should provide one more pixel in needRect.

M  +7    -0    libs/image/kis_transform_mask.cpp

https://invent.kde.org/kde/krita/commit/5cff2b6f1dee29b6b0a9ff4aa5064a2efe6dfab4
Comment 12 Dmitry Kazakov 2020-04-27 21:44:56 UTC
Git commit 063b4087d57eac5fc598ff6f97d9342f338ddd21 by Dmitry Kazakov.
Committed on 27/04/2020 at 21:44.
Pushed by dkazakov into branch 'krita/4.3'.

Fix a threading crash caused by transformation masks

The mask must not access pixels outside its need rect, it breaks
a contract between it and the scheduler. And since affine transformations
use bilinear interpolation, we should provide one more pixel in needRect.

M  +7    -0    libs/image/kis_transform_mask.cpp

https://invent.kde.org/kde/krita/commit/063b4087d57eac5fc598ff6f97d9342f338ddd21