<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>492114</bug_id>
          
          <creation_ts>2024-08-24 02:13:36 +0000</creation_ts>
          <short_desc>[SAFE ASSERT] Switching to selected Snapshot cause a safe assert warning</short_desc>
          <delta_ts>2024-09-13 13:51:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>General</component>
          <version>nightly build (please specify the git hash!)</version>
          <rep_platform>Appimage</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Protoniv">ss93078</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>penguinflyer2222</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/91d3906f79676771842a34cb4bcf2d635f6ca896</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2348271</commentid>
    <comment_count>0</comment_count>
    <who name="Protoniv">ss93078</who>
    <bug_when>2024-08-24 02:13:36 +0000</bug_when>
    <thetext>SUMMARY
Use snapshot docker to &quot;Switch to a selected Snapshot&quot;, a safe assert warning will popup, ignore it **won&apos;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 &quot;ignore&quot; and the second time &quot;Abort&quot;
```
SAFE ASSERT (krita): &quot;shape&quot; 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 &quot;layer-thumbnails-stroke&quot; is 289 ms
SAFE ASSERT (krita): &quot;shape&quot; in file /builds/graphics/krita/libs/ui/kis_node_manager.cpp, line 165

Thread 1 &quot;krita&quot; 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 &quot;Switch to a selected Snapshot&quot;
3. SAFE ASSERT popup

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2348368</commentid>
    <comment_count>1</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-24 13:47:26 +0000</bug_when>
    <thetext>Confirmed on 5.3.0-prealpha git 0c8b46a8df as well as 5.2.3. It doesn&apos;t happen in 5.2.2.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2351089</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2024-09-03 12:18:46 +0000</bug_when>
    <thetext>Git commit d1e839269fe08772c0483292dee5f25c69d83193 by Halla Rempt.
Committed on 03/09/2024 at 12:17.
Pushed by rempt into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2351090</commentid>
    <comment_count>3</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2024-09-03 12:19:13 +0000</bug_when>
    <thetext>Git commit 36e47aa0a2f0676705e809b865146ffacc96b2d3 by Halla Rempt.
Committed on 03/09/2024 at 12:19.
Pushed by rempt into branch &apos;krita/5.2&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2353519</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-09-13 13:49:53 +0000</bug_when>
    <thetext>Git commit 60c5dcaf3769268f763cc1be8bfe8c2076491906 by Dmitry Kazakov.
Committed on 13/09/2024 at 13:49.
Pushed by dkazakov into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2353522</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-09-13 13:51:03 +0000</bug_when>
    <thetext>Git commit 91d3906f79676771842a34cb4bcf2d635f6ca896 by Dmitry Kazakov.
Committed on 13/09/2024 at 13:50.
Pushed by dkazakov into branch &apos;krita/5.2&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>