Bug 521106 - Fatal crash on vector backslash
Summary: Fatal crash on vector backslash
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layers/Vector (other bugs)
Version First Reported In: 5.3.2.1
Platform: Mint (Ubuntu based) Linux
: NOR crash
Target Milestone: ---
Assignee: Elena Sagalaeva
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-06-05 19:59 UTC by C
Modified: 2026-06-25 07:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
The bug report from Krita (200.53 KB, text/plain)
2026-06-16 11:33 UTC, C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description C 2026-06-05 19:59:50 UTC
DESCRIPTION
When trying to undo a connection between two vector entities, a fatal crash happens

STEPS TO REPRODUCE
1. create a new document
2. create a vector layer
2. make two vector entities on created vector layer
3. select both entities with the "Edit Shapes Tool"
4. connect any ends together via the "Join with Segment" function
5. try and ctrl+z aka undo

OBSERVED RESULT
Fatal crash with no saving, no saved crash report and brush reset (I am can replicate this, but there is no hint of why that happens when it crashes)

EXPECTED RESULT
undoing the connection of the two entities

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

ADDITIONAL INFORMATION
I have tried locating the crash files, but the only thing I get is "The package providing /app/bin/krita could not be found.
If you want to generate a stack trace for this crash report, please reinstall it."
Comment 1 Tiar 2026-06-05 20:07:06 UTC
Can you please attach Help -> Show Krita log for bug reports?
You could also try to run Krita with gdb: `gdb krita_executable`, for example for the appimage: `gdb krita-5.3.2.1-x86_64.AppImage`. Then `r` to start it, then `bt` to see the backtrace when Krita finally crashes.
Comment 2 C 2026-06-16 11:33:30 UTC
Created attachment 193198 [details]
The bug report from Krita

this is the bug report how you asked it for, sorry for the long wait, life was a wee bit busy :(
Comment 3 Bug Janitor Service 2026-06-17 03:47:45 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.
Comment 4 Elena Sagalaeva 2026-06-19 23:35:34 UTC
I can reproduce this one. We continue to use a combined shape that was deleted. Sometimes it leads to an assert, and Krita can recover from it. Sometimes it's a crash.

Assert:
SAFE ASSERT (krita): "d->listeners.contains(listener)" in file C:/krita-dev/krita/libs/flake/KoShape.cpp, line 1163

Crash stack:
Exception thrown at 0x00007FFB133A97D3 (libkritaflake.dll) in krita.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

>	libkritaflake.dll!QListData::begin() Line 118	C++
 	libkritaflake.dll!QList<KoShape::ShapeChangeListener *>::contains_impl(KoShape::ShapeChangeListener * const & t, QListData::ArrayCompatibleLayout) Line 1098	C++
 	libkritaflake.dll!QList<KoShape::ShapeChangeListener *>::contains(KoShape::ShapeChangeListener * const & t) Line 1081	C++
 	libkritaflake.dll!KoShape::removeShapeChangeListener(KoShape::ShapeChangeListener * listener) Line 1163	C++
 	krita_flaketools.dll!DefaultToolTextPropertiesInterface::slotSelectionChanged() Line 2465	C++
 	krita_flaketools.dll!DefaultToolTextPropertiesInterface::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 326	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	libkritaui.dll!KisSelectedShapesProxy::selectionChanged() Line 157	C++
 	libkritaui.dll!KisSelectedShapesProxy::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 82	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	libkritaflake.dll!KoShapeManager::selectionChanged() Line 195	C++
 	libkritaflake.dll!KoShapeManager::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 107	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	libkritaflake.dll!KoSelection::selectionChanged() Line 150	C++
 	libkritaflake.dll!KoSelection::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 79	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	libkritaglobal.dll!KisThreadSafeSignalCompressor::timeout() Line 184	C++
 	libkritaglobal.dll!KisThreadSafeSignalCompressor::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 98	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	libkritaglobal.dll!KisSignalCompressor::timeout() Line 153	C++
 	libkritaglobal.dll!KisSignalCompressor::tryEmitSignalSafely() Line 200	C++
 	libkritaglobal.dll!KisSignalCompressor::tryEmitOnTick(bool isFromTimer) Line 176	C++
 	libkritaglobal.dll!KisSignalCompressor::slotTimerExpired() Line 212	C++
 	libkritaglobal.dll!KisSignalCompressor::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 94	C++
 	Qt5Core.dll!00007ffaf514f11d()	Unknown
 	Qt5Core.dll!00007ffaf5153de3()	Unknown
 	Qt5Core.dll!00007ffaf5144020()	Unknown
 	Qt5Widgets.dll!00007ffafa01c382()	Unknown
 	Qt5Widgets.dll!00007ffafa01d613()	Unknown
 	libkritaui.dll!KisApplication::notify(QObject * receiver, QEvent * event) Line 920	C++
 	Qt5Core.dll!00007ffaf511bc65()	Unknown
 	Qt5Core.dll!00007ffaf516eac4()	Unknown
 	Qt5Core.dll!00007ffaf516e80d()	Unknown
 	[External Code]	
 	Qt5Core.dll!00007ffaf516f91f()	Unknown
 	qwindows.dll!00007ffb0b2e7ba5()	Unknown
 	Qt5Core.dll!00007ffaf5118ef5()	Unknown
 	Qt5Core.dll!00007ffaf511c21d()	Unknown
 	krita.dll!00007ffb1a44741f()	Unknown
 	krita.exe!00007ff722c813d8()	Unknown
 	krita.exe!00007ff722c81311()	Unknown
 	krita.exe!00007ff722c81156()	Unknown
 	[External Code]
Comment 5 Elena Sagalaeva 2026-06-21 21:56:19 UTC
Using "Merge points" instead of "Join with Segment" leads to the same crash stack.
Comment 6 Bug Janitor Service 2026-06-22 03:48:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2828
Comment 7 Dmitry Kazakov 2026-06-25 07:34:33 UTC
Git commit eadecc881937c0e1c50f771e850e3938b4f4734e by Dmitry Kazakov, on behalf of Elena Sagalaeva.
Committed on 25/06/2026 at 07:34.
Pushed by dkazakov into branch 'master'.

Fix bug 521106. Remove combined shapes from a selected shapes list after deletion.

Combined shapes sometimes remain in the selected shapes list and might be used, leading to a crash. I added code, which removes deleted combined shapes from the selected shapes list.

## Test Plan

Follow the repro steps in 521106. Krita doesn't crash anymore.

## Formalities Checklist

- [x] I confirmed this builds.
- [x] I confirmed Krita ran and the relevant functions work.
- [x] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
- [x] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy).
- [x] I made sure my code conforms to the standards set in the HACKING file.
- [x] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy).
- [ ] Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at [Krita Documentation Repository](https://invent.kde.org/documentation/docs-krita-org)?

**_Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build._** **_If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, _****_kimageshop@kde.org_****_._**

M  +3    -2    plugins/tools/defaulttool/defaulttool/DefaultTool.cpp

https://invent.kde.org/graphics/krita/-/commit/eadecc881937c0e1c50f771e850e3938b4f4734e
Comment 8 Dmitry Kazakov 2026-06-25 07:35:07 UTC
Git commit 59021c70bae58a88dae8e87821aa36f58134a3f1 by Dmitry Kazakov, on behalf of Elena Sagalaeva.
Committed on 25/06/2026 at 07:35.
Pushed by dkazakov into branch 'krita/6.0'.

Fix bug 521106. Remove combined shapes from a selected shapes list after deletion.

Combined shapes sometimes remain in the selected shapes list and might be used, leading to a crash. I added code, which removes deleted combined shapes from the selected shapes list.

## Test Plan

Follow the repro steps in 521106. Krita doesn't crash anymore.

## Formalities Checklist

- [x] I confirmed this builds.
- [x] I confirmed Krita ran and the relevant functions work.
- [x] I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
- [x] I made sure my commits build individually and have good descriptions as per [KDE guidelines](https://community.kde.org/Policies/Commit_Policy).
- [x] I made sure my code conforms to the standards set in the HACKING file.
- [x] I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per [KDE Licensing Policy](https://community.kde.org/Policies/Licensing_Policy).
- [ ] Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at [Krita Documentation Repository](https://invent.kde.org/documentation/docs-krita-org)?

**_Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build._** **_If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, _****_kimageshop@kde.org_****_._**

M  +3    -2    plugins/tools/defaulttool/defaulttool/DefaultTool.cpp

https://invent.kde.org/graphics/krita/-/commit/59021c70bae58a88dae8e87821aa36f58134a3f1