<?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>392128</bug_id>
          
          <creation_ts>2018-03-21 08:33:05 +0000</creation_ts>
          <short_desc>Using select all after undoing text crashes Krita</short_desc>
          <delta_ts>2018-04-03 11:47:59 +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>Tool/Text</component>
          <version>4.0</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>release_blocker</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Antti Savolainen">antti.savo</reporter>
          <assigned_to name="Dmitry Kazakov">dimula73</assigned_to>
          <cc>halla</cc>
          
          <cf_commitlink>https://commits.kde.org/krita/9e00c163b354110f4bb94df01079f04c27d99c71</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>1739478</commentid>
    <comment_count>0</comment_count>
    <who name="Antti Savolainen">antti.savo</who>
    <bug_when>2018-03-21 08:33:05 +0000</bug_when>
    <thetext>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 &amp; Platform:

    Krita 4.0

Additional Information: Any other useful information. 

    https://webmshare.com/DdzDb Recorded video of the crash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739486</commentid>
    <comment_count>1</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2018-03-21 08:55:11 +0000</bug_when>
    <thetext>If you&apos;re really using Ubuntu packages, I wonder why you don&apos;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&lt;bool&gt;::reallocData(int, int, QFlags&lt;QArrayData::AllocationOption&gt;) (this=this@entry=0x7ffeb95b6140, asize=32551, aalloc=&lt;optimized out&gt;, options=..., options@entry=...) at /usr/include/qt5/QtCore/qvector.h:569
#8  0x00007f27eb5bf6be in QVector&lt;bool&gt;::detach() (this=0x7ffeb95b6140) at /usr/include/qt5/QtCore/qvector.h:384
#9  0x00007f27eb5bf6be in QVector&lt;bool&gt;::data() (this=0x7ffeb95b6140) at /usr/include/qt5/QtCore/qvector.h:129
#10 0x00007f27eb5bf6be in QVector&lt;bool&gt;::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&amp;, KoViewConverter const&amp;) (this=0xd598460, gc=..., converter=...) at /home/boud/dev/krita/plugins/tools/svgtexttool/SvgTextTool.cpp:220
#13 0x00007f27ec7c6227 in KisCanvasWidgetBase::drawDecorations(QPainter&amp;, QRect const&amp;) 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=&lt;optimized out&gt;, 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=&lt;optimized out&gt;, 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&amp;) (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=&lt;optimized out&gt;, 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=&lt;optimized out&gt;, 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=&lt;optimized out&gt;) 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&lt;QEventLoop::ProcessEventsFlag&gt;) (this=this@entry=0x2e517f0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#43 0x00007f27d68a9471 in QPAEventDispatcherGlib::processEvents(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (this=0x2e517f0, flags=...) at qeventdispatcher_glib.cpp:69
#44 0x00007f27e26c4a4b in QEventLoop::exec(QFlags&lt;QEventLoop::ProcessEventsFlag&gt;) (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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1739567</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2018-03-21 18:01:21 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1741847</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2018-03-30 09:12:52 +0000</bug_when>
    <thetext>Git commit 31e1f56160297e0bde0180c60a31452366a7b365 by Dmitry Kazakov.
Committed on 30/03/2018 at 09:11.
Pushed by dkazakov into branch &apos;master&apos;.

Fix a crash in SvgTextTool when deleting hovered/selected shape

In general we shouldn&apos;t store any pointers to shapes in the tool.
If we really need it, we should subscribe to &apos;selectionChanged&apos; or
&apos;shapeChanged&apos; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1742861</commentid>
    <comment_count>4</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2018-04-03 11:47:59 +0000</bug_when>
    <thetext>Git commit 9e00c163b354110f4bb94df01079f04c27d99c71 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 03/04/2018 at 11:20.
Pushed by rempt into branch &apos;krita/4.0&apos;.

Fix a crash in SvgTextTool when deleting hovered/selected shape

In general we shouldn&apos;t store any pointers to shapes in the tool.
If we really need it, we should subscribe to &apos;selectionChanged&apos; or
&apos;shapeChanged&apos; 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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>