<?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>523070</bug_id>
          
          <creation_ts>2026-07-15 00:22:31 +0000</creation_ts>
          <short_desc>Combined shapes plus redo operations lead to a crash</short_desc>
          <delta_ts>2026-07-27 12:00: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>Layers/Vector</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elena Sagalaeva">alenacpp</reporter>
          <assigned_to name="Elena Sagalaeva">alenacpp</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/478ddf4e6e5cebe3dbe0473d88d239c28e89ad01</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>2531788</commentid>
    <comment_count>0</comment_count>
    <who name="Elena Sagalaeva">alenacpp</who>
    <bug_when>2026-07-15 00:22:31 +0000</bug_when>
    <thetext>DESCRIPTION
Redoing the deletion of a combined shape causes a crash. 

STEPS TO REPRODUCE
1. Create a new document
2. Create a vector layer
2. Make two lines on the created vector layer
3. Select both lines with the &quot;Edit Shapes Tool&quot;
4. Connect any ends together via the &quot;Join with Segment&quot; function
5. Delete combined shape
6. Undo the deletion, undo the combine operation
8. Redo everything
9. Crash

OBSERVED RESULT
Krita crashes

EXPECTED RESULT
Krita shouldn&apos;t crash

SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a terminal window):
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

commit 2b927d92183e4722ac1561b25bc83b65438dffd7

	libkritaflake.dll!QScopedPointer&lt;KoShapeContainer::Private,QScopedPointerDeleter&lt;KoShapeContainer::Private&gt; &gt;::operator-&gt;() Line 118	C++
 	libkritaflake.dll!KoShapeContainer::shapeInterface() Line 172	C++
 	libkritaflake.dll!KoShape::setParent(KoShapeContainer * parent) Line 467	C++
 	libkritaflake.dll!KoShapeContainer::removeShape(KoShape * shape) Line 66	C++
 	libkritaflake.dll!KoShapeDeleteCommand::redo() Line 74	C++
 	libkritacommand.dll!KUndo2Command::redoMergedCommands() Line 424	C++
 	libkritacommand.dll!KUndo2QStack::redo() Line 989	C++
 	libkritaui.dll!UndoStack::redoImpl() Line 242	C++
 	libkritaui.dll!UndoStack::processPostponedJobs() Line 268	C++
 	libkritaui.dll!UndoStack::redo() Line 205	C++
 	libkritaui.dll!KisMainWindow::redo() Line 1547	C++
 	libkritaui.dll!KisMainWindow::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 436	C++</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2533140</commentid>
    <comment_count>1</comment_count>
    <who name="Elena Sagalaeva">alenacpp</who>
    <bug_when>2026-07-20 23:21:10 +0000</bug_when>
    <thetext>The issue is happening because Krita creates a new path shape each time during the &quot;redo()&quot; call. The subsequent operations don&apos;t know about it and continue to use the old one.

I used &quot;Delete&quot; to reproduce the issue, but other operations could be used instead. &quot;Move&quot;, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2533162</commentid>
    <comment_count>2</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-07-21 03:47:24 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2870</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2534506</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-07-27 11:59:09 +0000</bug_when>
    <thetext>Git commit 9ab35881aebecc78971292849d86558a79a39999 by Dmitry Kazakov, on behalf of Elena Sagalaeva.
Committed on 27/07/2026 at 11:50.
Pushed by dkazakov into branch &apos;master&apos;.

Do not create a new path shape in KoMultiPathPointMergeCommand::redo() call

The subsequent operations don&apos;t know about the new shape and continue to
use the old one, which causes crashes.

M  +26   -20   libs/flake/commands/KoMultiPathPointMergeCommand.cpp
M  +63   -0    libs/flake/tests/TestPointMergeCommand.cpp
M  +3    -0    libs/flake/tests/TestPointMergeCommand.h

https://invent.kde.org/graphics/krita/-/commit/9ab35881aebecc78971292849d86558a79a39999</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2534507</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-07-27 12:00:03 +0000</bug_when>
    <thetext>Git commit 478ddf4e6e5cebe3dbe0473d88d239c28e89ad01 by Dmitry Kazakov, on behalf of Elena Sagalaeva.
Committed on 27/07/2026 at 11:59.
Pushed by dkazakov into branch &apos;krita/6.0&apos;.

Do not create a new path shape in KoMultiPathPointMergeCommand::redo() call

The subsequent operations don&apos;t know about the new shape and continue to
use the old one, which causes crashes.

M  +26   -20   libs/flake/commands/KoMultiPathPointMergeCommand.cpp
M  +63   -0    libs/flake/tests/TestPointMergeCommand.cpp
M  +3    -0    libs/flake/tests/TestPointMergeCommand.h

https://invent.kde.org/graphics/krita/-/commit/478ddf4e6e5cebe3dbe0473d88d239c28e89ad01</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>