When you use the SVG-Text Tool to edit a text you placed before, the editor does not show the text anymore, then when you click save, Krita crashes to desktop. It only happens when you use a double click on an existing text to open the editor. It does not happen when you select the text and press enter or use the corresponding button in the Tool Options docker. My Boyfriend noticed this on Windows 10 (Downloaded from Steam), I can reproduce it on Manjaro with KDE using the Appimage. STEPS TO REPRODUCE 1. Open a new or existing Document. 2. Select the SVG-Text tool and place a text on the canvas (placeholder text is just fine) 3. Save the text and close the editor. 4. After closing it, open the editor again by double-clicking on the previously selected text (you should see the editor is empty) 5. Click save OBSERVED RESULT Text is missing and Krita crashes upon saving the empty text. EXPECTED RESULT Existing text should appear in the editor (and Krita should not crash on saving text) SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.1 Kernel Version: 5.8.11-1-MANJARO OS Type: 64-bit Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor Memory: 31,3 GiB of RAM Graphics Processor: AMD Radeon RX 5700 XT Also latest Windows 10 (Steam)
Hi, Thanks for the report. I can confirm the issue. Here's the backtrace: Thread 1 (Thread 0x7f92e02ac800 (LWP 30059)): [KCrash Handler] #4 0x00007f92e5a52c4c in QTextLine::ascent() const () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #5 0x00007f92e45a1827 in KoSvgTextShapeMarkupConverter::convertDocumentToSvg (this=this@entry=0x7ffc1253d228, doc=<optimized out>, svgText=svgText@entry=0x7ffc1253d218) at /home/boud/dev/4.3/libs/flake/text/KoSvgTextShapeMarkupConverter.cpp:669 #6 0x00007f92bc59fbd1 in SvgTextEditor::save (this=0x55b604444c10) at /home/boud/dev/4.3/plugins/tools/svgtexttool/SvgTextEditor.cpp:403 #7 0x00007f92bc59ac9f in SvgTextEditor::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-4.3/plugins/tools/svgtexttool/krita_tool_svgtext_autogen/EWIEGA46WW/moc_SvgTextEditor.cpp:288 #8 0x00007f92e555a5e0 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #9 0x00007f92e61fd8e6 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #10 0x00007f92e555a5e0 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #11 0x00007f92e6154c36 in QAbstractButton::clicked(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #12 0x00007f92e6154e5e in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #13 0x00007f92e6156333 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007f92e61564f5 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007f92e609fdb6 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007f92e605ccc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007f92e6065ec3 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007f92e7f9e87d in KisApplication::notify (this=<optimized out>, receiver=0x55b610a726b0, event=0x7ffc1253db30) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:688 #19 0x00007f92e55236aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #20 0x00007f92e6064fd7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007f92e60baffd in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007f92e60be4dc in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007f92e605ccc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007f92e6065c70 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007f92e7f9e87d in KisApplication::notify (this=<optimized out>, receiver=0x55b60d6fea20, event=0x7ffc1253e030) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:688 #26 0x00007f92e55236aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #27 0x00007f92e5952f78 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #28 0x00007f92e59545b5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #29 0x00007f92e592c2cb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5 #30 0x00007f92dfa6899e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #31 0x00007f92e2864fbd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #32 0x00007f92e2865240 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #33 0x00007f92e28652e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #34 0x00007f92e557de92 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #35 0x00007f92e55221bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #36 0x00007f92e552a354 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5 #37 0x000055b6011c1e63 in main (argc=<optimized out>, argv=0x7ffc1253e6f8) at /home/boud/dev/4.3/krita/main.cc:620 [Inferior 1 (process 30059) detached]
Hi, I've heard about something like that but it was supposed to be only on master and I couldn't reproduce it anyway... I'll fix that asap (which probably means next week).
Git commit 9a7910865e06be82d2a10d044a6ec0c2f04dac99 by Agata Cacko. Committed on 27/10/2020 at 14:58. Pushed by tymond into branch 'master'. Fix crash in Text Tool on double-click Before this commit, if the user would double-click on the text shape while using a text tool, it would first show an editor with an empty text box, and then if the user does something else without changing the content (like Save, or switch to SVG) which would trigger conversion to shape or SVG, then Krita would crash. It was caused by double-click causing three events to be fired: - double-click - mouse release - another mouse release. In all three cases showEditor() would be called, including setInitialShape() function which is called inside. This commit fixes this behaviour by checking if the editor is already visible, and if yes, then not trying to set initial shape or show the editor since it's not necessary anymore. M +4 -2 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/commit/9a7910865e06be82d2a10d044a6ec0c2f04dac99
Git commit ec67f1fff4c342af5a6ec5615a71f1dd7ad2aa3f by Agata Cacko. Committed on 27/10/2020 at 14:59. Pushed by tymond into branch 'krita/4.3'. Fix crash in Text Tool on double-click Before this commit, if the user would double-click on the text shape while using a text tool, it would first show an editor with an empty text box, and then if the user does something else without changing the content (like Save, or switch to SVG) which would trigger conversion to shape or SVG, then Krita would crash. It was caused by double-click causing three events to be fired: - double-click - mouse release - another mouse release. In all three cases showEditor() would be called, including setInitialShape() function which is called inside. This commit fixes this behaviour by checking if the editor is already visible, and if yes, then not trying to set initial shape or show the editor since it's not necessary anymore. (cherry picked from commit 9a7910865e06be82d2a10d044a6ec0c2f04dac99) M +4 -2 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/commit/ec67f1fff4c342af5a6ec5615a71f1dd7ad2aa3f
Git commit 56133bf776e0dcc98adecc9d43cffa923010632c by Agata Cacko. Committed on 27/10/2020 at 15:00. Pushed by tymond into branch 'krita/4.4.0'. Fix crash in Text Tool on double-click Before this commit, if the user would double-click on the text shape while using a text tool, it would first show an editor with an empty text box, and then if the user does something else without changing the content (like Save, or switch to SVG) which would trigger conversion to shape or SVG, then Krita would crash. It was caused by double-click causing three events to be fired: - double-click - mouse release - another mouse release. In all three cases showEditor() would be called, including setInitialShape() function which is called inside. This commit fixes this behaviour by checking if the editor is already visible, and if yes, then not trying to set initial shape or show the editor since it's not necessary anymore. (cherry picked from commit 9a7910865e06be82d2a10d044a6ec0c2f04dac99) M +4 -2 plugins/tools/svgtexttool/SvgTextTool.cpp https://invent.kde.org/graphics/krita/commit/56133bf776e0dcc98adecc9d43cffa923010632c