| Summary: | Vector shape with text leads to crash with undo steps | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | acc4commissions |
| Component: | Tools/Vector | Assignee: | Elena Sagalaeva <alenacpp> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | alenacpp |
| Priority: | NOR | ||
| Version First Reported In: | 5.3.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Other | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/e9ed48baa3b43022f5746cc288884690e80d95e7 | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
acc4commissions
2026-06-01 23:50:55 UTC
Ok. The crash seems to be reproducible with simpler steps. It doesn't need to involve a vector shape. 1. Create a document, add a vector layer. 2. Create a text on the vector layer. 3. Select any other tool. 4. Undo and go back to the initial state of the document. 5. Do it again- Add a vector layer, and try to add text on it. 6. Crash. Thanks for reporting! I can reproduce this one on my Windows machine. It's use-after-free, so the crash stack varies. Here is one of mine: Exception thrown at 0x00007FFAF34DE5DC (libkritaflake.dll) in krita.exe: 0xC0000005: Access violation reading location 0x0000000000000004. libkritaflake.dll!QVector<CursorPos>::isEmpty() Line 90 C++ libkritaflake.dll!KoSvgTextShape::topLevelNodeForPos(int pos) Line 1530 C++ krita_tool_svgtext.dll!SvgTextOnPathDecorationHelper::decorationRect(const QTransform documentToView) Line 119 C++ krita_tool_svgtext.dll!SvgTextTool::decorationsRect() Line 679 C++ libkritaflake.dll!KoToolBase::repaintDecorations() Line 399 C++ krita_tool_svgtext.dll!SvgTextTool::activate(const QSet<KoShape *> & shapes) Line 200 C++ libkritaflake.dll!KoToolManager::Private::postSwitchTool() Line 577 C++ libkritaflake.dll!KoToolManager::Private::switchTool(const QString & id) Line 533 C++ libkritaflake.dll!KoToolManager::switchToolRequested(const QString & id) Line 257 C++ libkritaflake.dll!KoToolAction::trigger() Line 36 C++ libkritaflake.dll!KoToolAction::qt_static_metacall(QObject * _o, QMetaObject::Call _c, int _id, void * * _a) Line 82 C++ Qt5Core.dll!00007ffaf3bef11d() Unknown Qt5Widgets.dll!00007ffaf74d52a1() Unknown Qt5Widgets.dll!00007ffaf74d5130() Unknown Qt5Widgets.dll!00007ffaf74d612b() Unknown Qt5Widgets.dll!00007ffaf75c742e() Unknown Qt5Widgets.dll!00007ffaf74356d6() Unknown Qt5Widgets.dll!00007ffaf75c7b48() Unknown Qt5Widgets.dll!00007ffaf73fc382() Unknown Qt5Widgets.dll!00007ffaf73fefb8() Unknown libkritaui.dll!KisApplication::notify(QObject * receiver, QEvent * event) Line 920 C++ Qt5Core.dll!00007ffaf3bbbc65() Unknown Qt5Widgets.dll!00007ffaf73fcc02() Unknown Qt5Widgets.dll!00007ffaf74512e7() Unknown Qt5Widgets.dll!00007ffaf7450284() Unknown Qt5Widgets.dll!00007ffaf73fc382() Unknown Qt5Widgets.dll!00007ffaf73fd613() Unknown libkritaui.dll!KisApplication::notify(QObject * receiver, QEvent * event) Line 920 C++ Qt5Core.dll!00007ffaf3bbbc65() Unknown Qt5Gui.dll!00007ffaf547606d() Unknown Qt5Gui.dll!00007ffaf545d5ca() Unknown Qt5Core.dll!00007ffaf3c0f30c() Unknown qwindows.dll!00007ffb0b2e7ba5() Unknown Qt5Core.dll!00007ffaf3bb8ef5() Unknown Qt5Core.dll!00007ffaf3bbc21d() Unknown krita.dll!00007ffb1a0f741f() Unknown krita.exe!00007ff7e2ed13d8() Unknown krita.exe!00007ff7e2ed1311() Unknown krita.exe!00007ff7e2ed1156() Unknown [External Code] A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2827 Git commit 65b10b98c9b0373afcae723fd23272a24867b137 by Dmitry Kazakov, on behalf of Elena Sagalaeva. Committed on 22/06/2026 at 09:42. Pushed by dkazakov into branch 'master'. Fix bug 520939. Deselect deleted text shape. Krita sometimes crashes when a text shape is deleted. I changed the selection code to correctly handle the case where no text shape is selected. ## Test Plan Follow the bug 520939 repro steps. 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 +1 -1 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/-/commit/65b10b98c9b0373afcae723fd23272a24867b137 Git commit e9ed48baa3b43022f5746cc288884690e80d95e7 by Dmitry Kazakov, on behalf of Elena Sagalaeva. Committed on 22/06/2026 at 09:43. Pushed by dkazakov into branch 'krita/6.0'. Fix bug 520939. Deselect deleted text shape. Krita sometimes crashes when a text shape is deleted. I changed the selection code to correctly handle the case where no text shape is selected. ## Test Plan Follow the bug 520939 repro steps. 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 +1 -1 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/-/commit/e9ed48baa3b43022f5746cc288884690e80d95e7 |