Bug 392128 - Using select all after undoing text crashes Krita
Summary: Using select all after undoing text crashes Krita
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tool/Text (show other bugs)
Version: 4.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2018-03-21 08:33 UTC by Antti Savolainen
Modified: 2018-04-03 11:47 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Savolainen 2018-03-21 08:33:05 UTC
Overview:

    Select all keyboard command crashes krita if used after the Ctrl+Z on text

Steps to Reproduce: 

    1) Create a text using the text tool

    2) Use Ctrl+Z to undo it

    3) Use Ctrl+A

Actual Results:

    The application crashed.

Expected Results: 

    The whole canvas should be selected

Build Date & Platform:

    Krita 4.0

Additional Information: Any other useful information. 

    https://webmshare.com/DdzDb Recorded video of the crash
Comment 1 Halla Rempt 2018-03-21 08:55:11 UTC
If you're really using Ubuntu packages, I wonder why you don't get the Dr Konqui crash dialog with a backtrace... 

Thread 1 (Thread 0x7f27ed2a9940 (LWP 5634)):
[KCrash Handler]
#6  0x00007f27e18a0110 in __memcpy_sse2_unaligned () at /lib64/libc.so.6
#7  0x00007f27eb52707b in QVector<bool>::reallocData(int, int, QFlags<QArrayData::AllocationOption>) (this=this@entry=0x7ffeb95b6140, asize=32551, aalloc=<optimized out>, options=..., options@entry=...) at /usr/include/qt5/QtCore/qvector.h:569
#8  0x00007f27eb5bf6be in QVector<bool>::detach() (this=0x7ffeb95b6140) at /usr/include/qt5/QtCore/qvector.h:384
#9  0x00007f27eb5bf6be in QVector<bool>::data() (this=0x7ffeb95b6140) at /usr/include/qt5/QtCore/qvector.h:129
#10 0x00007f27eb5bf6be in QVector<bool>::operator[](int) (i=0, this=0x7ffeb95b6140) at /usr/include/qt5/QtCore/qvector.h:432
#11 0x00007f27eb5bf6be in KisSimpleStrokeStrategy::createStrategy(KisSimpleStrokeStrategy::JobType) (this=0x7ffeb95b6100, type=KisSimpleStrokeStrategy::JOB_INIT) at /home/boud/dev/krita/libs/image/kis_simple_stroke_strategy.cpp:104
#12 0x00007f27b77c1dcb in SvgTextTool::paint(QPainter&, KoViewConverter const&) (this=0xd598460, gc=..., converter=...) at /home/boud/dev/krita/plugins/tools/svgtexttool/SvgTextTool.cpp:220
#13 0x00007f27ec7c6227 in KisCanvasWidgetBase::drawDecorations(QPainter&, QRect const&) const (this=0xd53fbe8, gc=..., updateWidgetRect=...) at /home/boud/dev/krita/libs/ui/canvas/kis_canvas_widget_base.cpp:149
#14 0x00007f27ec98aead in KisOpenGLCanvas2::renderDecorations(QPainter*) (this=this@entry=0xd53fbb0, painter=painter@entry=0x7ffeb95b6430) at /home/boud/dev/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:849
#15 0x00007f27ec991b8d in KisOpenGLCanvas2::paintGL() (this=0xd53fbb0) at /home/boud/dev/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:373
#16 0x00007f27e36436a8 in QOpenGLWidgetPrivate::invokeUserPaint() (this=0xd53fe50) at kernel/qopenglwidget.cpp:878
#17 0x00007f27e3626409 in QWidget::event(QEvent*) (this=0xd53fbb0, event=0x7ffeb95b6800) at kernel/qwidget.cpp:8972
#18 0x00007f27e35ea7fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0xd53fbb0, e=0x7ffeb95b6800) at kernel/qapplication.cpp:3733
#19 0x00007f27e35f15e0 in QApplication::notify(QObject*, QEvent*) (this=0x7ffeb95b76e0, receiver=receiver@entry=0xd53fbb0, e=e@entry=0x7ffeb95b6800) at kernel/qapplication.cpp:3492
#20 0x00007f27ecafba87 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0xd53fbb0, event=0x7ffeb95b6800) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:620
#21 0x00007f27e26c6325 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=receiver@entry=0xd53fbb0, event=event@entry=0x7ffeb95b6800) at kernel/qcoreapplication.cpp:1044
#22 0x00007f27e361f12a in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (event=0x7ffeb95b6800, receiver=0xd53fbb0) at ../../src/corelib/kernel/qcoreapplication.h:237
#23 0x00007f27e361f12a in QWidgetPrivate::sendPaintEvent(QRegion const&) (this=0xd53fe50, toBePainted=...) at kernel/qwidget.cpp:5687
#24 0x00007f27e35f87ac in QWidgetBackingStore::doSync() (this=this@entry=0xa698130) at kernel/qwidgetbackingstore.cpp:1282
#25 0x00007f27e35f9dd9 in QWidgetBackingStore::sync() (this=0xa698130) at kernel/qwidgetbackingstore.cpp:1156
#26 0x00007f27e361166f in QWidgetPrivate::syncBackingStore() (this=this@entry=0xabe9a20) at kernel/qwidget.cpp:1959
#27 0x00007f27e3626024 in QWidget::event(QEvent*) (this=this@entry=0xabe9860, event=event@entry=0x11f8dc30) at kernel/qwidget.cpp:9136
#28 0x00007f27e3733ae1 in QMainWindow::event(QEvent*) (this=this@entry=0xabe9860, event=event@entry=0x11f8dc30) at widgets/qmainwindow.cpp:1342
#29 0x00007f27e9a2287a in KMainWindow::event(QEvent*) (this=this@entry=0xabe9860, ev=ev@entry=0x11f8dc30) at /home/boud/dev/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:780
#30 0x00007f27e9a5b999 in KXmlGuiWindow::event(QEvent*) (this=0xabe9860, ev=0x11f8dc30) at /home/boud/dev/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#31 0x00007f27e35ea7fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0xabe9860, e=0x11f8dc30) at kernel/qapplication.cpp:3733
#32 0x00007f27e35f15e0 in QApplication::notify(QObject*, QEvent*) (this=0x7ffeb95b76e0, receiver=receiver@entry=0xabe9860, e=e@entry=0x11f8dc30) at kernel/qapplication.cpp:3492
#33 0x00007f27ecafba87 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0xabe9860, event=0x11f8dc30) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:620
#34 0x00007f27e26c6325 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0xabe9860, event=event@entry=0x11f8dc30) at kernel/qcoreapplication.cpp:1044
#35 0x00007f27e26c8d43 in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x11f8dc30, receiver=<optimized out>) at kernel/qcoreapplication.h:234
#36 0x00007f27e26c8d43 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x2dcf5a0) at kernel/qcoreapplication.cpp:1719
#37 0x00007f27e26c9288 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1573
#38 0x00007f27e2719773 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x2e5c540) at kernel/qeventdispatcher_glib.cpp:276
#39 0x00007f27dd5c8134 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#40 0x00007f27dd5c8388 in  () at /usr/lib64/libglib-2.0.so.0
#41 0x00007f27dd5c842c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#42 0x00007f27e2718f9c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x2e517f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#43 0x00007f27d68a9471 in QPAEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x2e517f0, flags=...) at qeventdispatcher_glib.cpp:69
#44 0x00007f27e26c4a4b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7ffeb95b71f0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#45 0x00007f27e26cd104 in QCoreApplication::exec() () at kernel/qcoreapplication.cpp:1332
#46 0x00007f27e2c33e5c in QGuiApplication::exec() () at kernel/qguiapplication.cpp:1687
#47 0x00007f27e35ea755 in QApplication::exec() () at kernel/qapplication.cpp:2918
#48 0x000000000040574b in main(int, char**) (argc=1, argv=0x7ffeb95b7868) at /home/boud/dev/krita/krita/main.cc:359
Comment 2 Halla Rempt 2018-03-21 18:01:21 UTC
Hi Antti,

In case you find more more bugs... Could you also install the debug symbols? Simply add a deb-src line for the lime ppa.
Comment 3 Dmitry Kazakov 2018-03-30 09:12:52 UTC
Git commit 31e1f56160297e0bde0180c60a31452366a7b365 by Dmitry Kazakov.
Committed on 30/03/2018 at 09:11.
Pushed by dkazakov into branch 'master'.

Fix a crash in SvgTextTool when deleting hovered/selected shape

In general we shouldn't store any pointers to shapes in the tool.
If we really need it, we should subscribe to 'selectionChanged' or
'shapeChanged' signals to ensure we know when the shape got destroyed
by some unexpected (for us) entity (e.g. undo stack).

M  +13   -0    libs/global/KisHandleStyle.cpp
M  +6    -0    libs/global/KisHandleStyle.h
M  +2    -2    plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +1    -1    plugins/tools/svgtexttool/SvgTextEditor.h
M  +120  -55   plugins/tools/svgtexttool/SvgTextTool.cpp
M  +7    -3    plugins/tools/svgtexttool/SvgTextTool.h

https://commits.kde.org/krita/31e1f56160297e0bde0180c60a31452366a7b365
Comment 4 Halla Rempt 2018-04-03 11:47:59 UTC
Git commit 9e00c163b354110f4bb94df01079f04c27d99c71 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 03/04/2018 at 11:20.
Pushed by rempt into branch 'krita/4.0'.

Fix a crash in SvgTextTool when deleting hovered/selected shape

In general we shouldn't store any pointers to shapes in the tool.
If we really need it, we should subscribe to 'selectionChanged' or
'shapeChanged' signals to ensure we know when the shape got destroyed
by some unexpected (for us) entity (e.g. undo stack).
(cherry picked from commit 31e1f56160297e0bde0180c60a31452366a7b365)

M  +13   -0    libs/global/KisHandleStyle.cpp
M  +6    -0    libs/global/KisHandleStyle.h
M  +2    -2    plugins/tools/svgtexttool/SvgTextEditor.cpp
M  +1    -1    plugins/tools/svgtexttool/SvgTextEditor.h
M  +120  -55   plugins/tools/svgtexttool/SvgTextTool.cpp
M  +7    -3    plugins/tools/svgtexttool/SvgTextTool.h

https://commits.kde.org/krita/9e00c163b354110f4bb94df01079f04c27d99c71