Bug 492114 - [SAFE ASSERT] Switching to selected Snapshot cause a safe assert warning
Summary: [SAFE ASSERT] Switching to selected Snapshot cause a safe assert warning
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2024-08-24 02:13 UTC by Protoniv
Modified: 2024-09-13 13:51 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 Protoniv 2024-08-24 02:13:36 UTC
SUMMARY
Use snapshot docker to "Switch to a selected Snapshot", a safe assert warning will popup, ignore it **won't**
 crash krita, but the bottom layer in Layer Docker will become Active Layer


Here is the terminal log with the bug trigger two times, first time "ignore" and the second time "Abort"
```
SAFE ASSERT (krita): "shape" in file /builds/graphics/krita/libs/ui/kis_node_manager.cpp, line 165
WARNING: idle task consumed more than 200 ms, it can cause visible distractions to the user
WARNING: time consumed in "layer-thumbnails-stroke" is 289 ms
SAFE ASSERT (krita): "shape" in file /builds/graphics/krita/libs/ui/kis_node_manager.cpp, line 165

Thread 1 "krita" received signal SIGABRT, Aborted.
0x00007ffff4aa94ac in __pthread_kill_implementation () from /lib64/libc.so.6
```

OpenSUSE 15.5/15.6 Leap
krita-5.3.0-prealpha-242de665a4-x86_64.appimage

STEPS TO REPRODUCE
1. Draw on canvas, and create a new snapshot with snapshot docker
2. continue drawing, and then select a snapshot and press "Switch to a selected Snapshot"
3. SAFE ASSERT popup

ADDITIONAL INFORMATION
Comment 1 Freya Lupen 2024-08-24 13:47:26 UTC
Confirmed on 5.3.0-prealpha git 0c8b46a8df as well as 5.2.3. It doesn't happen in 5.2.2.
Comment 2 Halla Rempt 2024-09-03 12:18:46 UTC
Git commit d1e839269fe08772c0483292dee5f25c69d83193 by Halla Rempt.
Committed on 03/09/2024 at 12:17.
Pushed by rempt into branch 'master'.

Remove superfluous commented-out return statements

Apparently I added those together with the safe asserts.

M  +0    -2    libs/ui/kis_node_manager.cpp

https://invent.kde.org/graphics/krita/-/commit/d1e839269fe08772c0483292dee5f25c69d83193
Comment 3 Halla Rempt 2024-09-03 12:19:13 UTC
Git commit 36e47aa0a2f0676705e809b865146ffacc96b2d3 by Halla Rempt.
Committed on 03/09/2024 at 12:19.
Pushed by rempt into branch 'krita/5.2'.

Remove superfluous commented-out return statements

Apparently I added those together with the safe asserts.
(cherry picked from commit d1e839269fe08772c0483292dee5f25c69d83193)

M  +0    -2    libs/ui/kis_node_manager.cpp

https://invent.kde.org/graphics/krita/-/commit/36e47aa0a2f0676705e809b865146ffacc96b2d3
Comment 4 Dmitry Kazakov 2024-09-13 13:49:53 UTC
Git commit 60c5dcaf3769268f763cc1be8bfe8c2076491906 by Dmitry Kazakov.
Committed on 13/09/2024 at 13:49.
Pushed by dkazakov into branch 'master'.

Fix an assert when trying to activate an image snapshot

Node activation should happen via KisImageSignalRouter since it
pushes the signal into the same queue where node removel/addition
signals go (via KisSynchronizedConnection).

M  +7    -1    plugins/dockers/snapshotdocker/KisSnapshotModel.cpp

https://invent.kde.org/graphics/krita/-/commit/60c5dcaf3769268f763cc1be8bfe8c2076491906
Comment 5 Dmitry Kazakov 2024-09-13 13:51:03 UTC
Git commit 91d3906f79676771842a34cb4bcf2d635f6ca896 by Dmitry Kazakov.
Committed on 13/09/2024 at 13:50.
Pushed by dkazakov into branch 'krita/5.2'.

Fix an assert when trying to activate an image snapshot

Node activation should happen via KisImageSignalRouter since it
pushes the signal into the same queue where node removel/addition
signals go (via KisSynchronizedConnection).

M  +7    -1    plugins/dockers/snapshotdocker/KisSnapshotModel.cpp

https://invent.kde.org/graphics/krita/-/commit/91d3906f79676771842a34cb4bcf2d635f6ca896