Bug 458264

Summary: Safe assert in KisSelectionBasedImage when copying a Fill Layer
Product: [Applications] krita Reporter: amyspark <amy>
Component: ToolsAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Stacktraces of the two safe asserts

Description amyspark 2022-08-24 17:15:02 UTC
Created attachment 151559 [details]
Stacktraces of the two safe asserts

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Create a 4K image.
2. Add a single Fill Layer.
3. Select All, then Copy.

OBSERVED RESULT

The following assert is logged twice for each copy attempt:

SAFE ASSERT (krita): "imageSP" in file E:\krita-win\src\libs\image\kis_selection_based_layer.cpp, line 240

EXPECTED RESULT

Copy is successful and without errors.

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

ADDITIONAL INFORMATION
commit 1d06a65308
Comment 1 Halla Rempt 2022-09-07 12:31:57 UTC
Confirmed (I built master with abort on safe asserts).
Comment 2 Halla Rempt 2022-09-07 12:47:44 UTC
Hm, I could only reproduce it once, though... Maybe there's a race trying to make the KisImageWSP a strongref somewhere?
Comment 3 Halla Rempt 2022-09-07 12:49:00 UTC
I can also get the assert when pasting, even if it didn't trigger when copying.
Comment 4 amyspark 2022-09-07 12:57:03 UTC
Safe assert was introduced in https://invent.kde.org/graphics/krita/-/commit/250d243da6622af863c9b2090c452c292dd3d0fc , which was quite a long time ago... I don't know why it is triggering just now.
Comment 5 Halla Rempt 2022-09-07 13:05:06 UTC
There have been several changes in the way nodes are added to the layer stack, so maybe that's triggering something.
Comment 6 Dmitry Kazakov 2024-08-22 16:39:36 UTC
Remove triaged keyword from CONFIRMED bugs