Bug 393087 - Vector Break at Segment / Break at Point Crash
Summary: Vector Break at Segment / Break at Point Crash
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools (show other bugs)
Version: 4.0.1
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 393089 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-13 06:25 UTC by Dustin Mundy
Modified: 2018-05-02 11:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin Mundy 2018-04-13 06:25:20 UTC
Right clicking in point select mode and clicking "Break at Segment" or "Break at Point" causes Krita to crash.
Comment 1 Antti Savolainen 2018-04-13 08:08:23 UTC
Confirming this https://webmshare.com/OXbon

Build Date & Platform:

    krita 4.1.0-pre-alpha
    Xubuntu 17.10
    Krita Lime https://launchpad.net/~kritalime/+archive/ubuntu/ppa

'Break at point' requires a bit of fiddling with the nodes before it crashes krita.

Stacktrace:
(gdb) bt
#0  0x00007ffff1545850 in KoPathPoint::point() const (this=0x0) at ./libs/flake/KoPathPoint.cpp:389
#1  0x00007ffff1644d4a in KoPathTool::paint(QPainter&, KoViewConverter const&) (this=0x5555612243d0, painter=..., converter=...) at ./libs/flake/tools/KoPathTool.cpp:559
#2  0x00007ffff15bb659 in KoToolProxy::paint(QPainter&, KoViewConverter const&) (this=0x555561127168, painter=..., converter=...) at ./libs/flake/KoToolProxy.cpp:144
#3  0x00007ffff724bc58 in KisCanvasWidgetBase::drawDecorations(QPainter&, QRect const&) const (this=0x5555566a17c8, gc=..., updateWidgetRect=...) at ./libs/ui/canvas/kis_canvas_widget_base.cpp:157
#4  0x00007ffff74b23fd in KisOpenGLCanvas2::renderDecorations(QPainter*) (this=0x5555566a1790, painter=0x7fffffffb930) at ./libs/ui/opengl/kis_opengl_canvas2.cpp:849
#5  0x00007ffff74af6ea in KisOpenGLCanvas2::paintGL() (this=0x5555566a1790) at ./libs/ui/opengl/kis_opengl_canvas2.cpp:373
#6  0x00007ffff5e9efdd in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#7  0x00007ffff5e7edc8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff5e3e46c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff5e45d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff76aa495 in KisApplication::notify(QObject*, QEvent*) (this=0x7fffffffddb0, receiver=0x5555566a1790, event=0x7fffffffbd00) at ./libs/ui/KisApplication.cpp:652
#11 0x00007ffff50c3de8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff5e77f6a in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff5e7852a in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff5e79190 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff5e79319 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff5e78136 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff5e4da84 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007ffff5e4dcc5 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007ffff5e6753f in QWidgetPrivate::syncBackingStore() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff5e7ef38 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff5f6cbab in QMainWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff6aab839 in KMainWindow::event(QEvent*) (this=0x55555f0621c0, ev=0x7fffd800a500) at ./libs/widgetutils/xmlgui/kmainwindow.cpp:780
#35 0x00007ffff6ae33d1 in KXmlGuiWindow::event(QEvent*) (this=0x55555f0621c0, ev=0x7fffd800a500) at ./libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#36 0x00007ffff5e3e46c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007ffff5e45d34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007ffff76aa495 in KisApplication::notify(QObject*, QEvent*) (this=0x7fffffffddb0, receiver=0x55555f0621c0, event=0x7fffd800a500) at ./libs/ui/KisApplication.cpp:652
#39 0x00007ffff50c3de8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007ffff50c655d in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007ffff511ce53 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007fffec790fb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007fffec7911f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007fffec79127c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff511c47f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#46 0x00007ffff50c1e3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007ffff50cada4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x0000555555849423 in main(int, char**) (argc=1, argv=0x7fffffffdf38) at ./krita/main.cc:361
Comment 2 Dmitry Kazakov 2018-04-18 20:55:00 UTC
*** Bug 393089 has been marked as a duplicate of this bug. ***
Comment 3 Dmitry Kazakov 2018-04-24 13:12:41 UTC
Git commit 25a628eb1ae047b37045cda4bc705dfc2b0b5731 by Dmitry Kazakov.
Committed on 24/04/2018 at 13:12.
Pushed by dkazakov into branch 'master'.

Fix crashes on undo/redo of vector path points operations

1) KoPathToolSelection keeps pointers to the shapes and its path points,
   therefore it should subscribe to the updates on the shapes and their
   points (using ShapeChangeListener framework).

2) The patch also fixes a lot of bugs in "Join by segment" and
   "Merge points", which should behave correctly now.

3) The patch also partially implements "keep path point selection"
   idea, which selects newly created point after each operation. The
   stuff is achieved using KoPathShape::PointSelectionChangeListener
   listener.
Related: bug 393209

M  +1    -0    libs/flake/CMakeLists.txt
M  +70   -2    libs/flake/KoPathShape.cpp
M  +12   -0    libs/flake/KoPathShape.h
M  +2    -0    libs/flake/KoPathShape_p.h
M  +5    -11   libs/flake/commands/KoMultiPathPointMergeCommand.cpp
M  +9    -0    libs/flake/commands/KoPathBreakAtPointCommand.cpp
A  +70   -0    libs/flake/commands/KoPathMergeUtils.cpp     [License: GPL (v2+)]
A  +37   -0    libs/flake/commands/KoPathMergeUtils.h     [License: GPL (v2+)]
M  +13   -1    libs/flake/commands/KoPathPointInsertCommand.cpp
M  +98   -120  libs/flake/commands/KoPathPointMergeCommand.cpp
M  +11   -0    libs/flake/commands/KoPathPointRemoveCommand.cpp
M  +63   -39   libs/flake/commands/KoSubpathJoinCommand.cpp
M  +10   -3    libs/flake/commands/KoSubpathJoinCommand.h
M  +15   -2    libs/flake/tools/KoPathTool.cpp
M  +3    -0    libs/flake/tools/KoPathTool.h
M  +62   -0    libs/flake/tools/KoPathToolSelection.cpp
M  +6    -1    libs/flake/tools/KoPathToolSelection.h
M  +4    -0    plugins/flake/pathshapes/ellipse/EllipseShape.cpp
M  +2    -0    plugins/flake/pathshapes/enhancedpath/EnhancedPathShape.cpp
M  +4    -0    plugins/flake/pathshapes/rectangle/RectangleShape.cpp
M  +2    -0    plugins/flake/pathshapes/spiral/SpiralShape.cpp
M  +2    -0    plugins/flake/pathshapes/star/StarShape.cpp

https://commits.kde.org/krita/25a628eb1ae047b37045cda4bc705dfc2b0b5731
Comment 4 Halla Rempt 2018-05-02 11:58:25 UTC
Git commit ba377491cdd4bc825de07035f7ed2e0a05545c84 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 02/05/2018 at 11:54.
Pushed by rempt into branch 'krita/4.0'.

Fix crashes on undo/redo of vector path points operations

1) KoPathToolSelection keeps pointers to the shapes and its path points,
   therefore it should subscribe to the updates on the shapes and their
   points (using ShapeChangeListener framework).

2) The patch also fixes a lot of bugs in "Join by segment" and
   "Merge points", which should behave correctly now.

3) The patch also partially implements "keep path point selection"
   idea, which selects newly created point after each operation. The
   stuff is achieved using KoPathShape::PointSelectionChangeListener
   listener.
Related: bug 393209
(cherry picked from commit f919e7f2dbed028e8fdae89b58ed6f5af26760db)

M  +1    -0    libs/flake/CMakeLists.txt
M  +70   -2    libs/flake/KoPathShape.cpp
M  +12   -0    libs/flake/KoPathShape.h
M  +2    -0    libs/flake/KoPathShape_p.h
M  +5    -11   libs/flake/commands/KoMultiPathPointMergeCommand.cpp
M  +9    -0    libs/flake/commands/KoPathBreakAtPointCommand.cpp
A  +70   -0    libs/flake/commands/KoPathMergeUtils.cpp     [License: GPL (v2+)]
A  +37   -0    libs/flake/commands/KoPathMergeUtils.h     [License: GPL (v2+)]
M  +13   -1    libs/flake/commands/KoPathPointInsertCommand.cpp
M  +98   -120  libs/flake/commands/KoPathPointMergeCommand.cpp
M  +11   -0    libs/flake/commands/KoPathPointRemoveCommand.cpp
M  +63   -39   libs/flake/commands/KoSubpathJoinCommand.cpp
M  +10   -3    libs/flake/commands/KoSubpathJoinCommand.h
M  +15   -2    libs/flake/tools/KoPathTool.cpp
M  +3    -0    libs/flake/tools/KoPathTool.h
M  +62   -0    libs/flake/tools/KoPathToolSelection.cpp
M  +6    -1    libs/flake/tools/KoPathToolSelection.h
M  +4    -0    plugins/flake/pathshapes/ellipse/EllipseShape.cpp
M  +2    -0    plugins/flake/pathshapes/enhancedpath/EnhancedPathShape.cpp
M  +4    -0    plugins/flake/pathshapes/rectangle/RectangleShape.cpp
M  +2    -0    plugins/flake/pathshapes/spiral/SpiralShape.cpp
M  +2    -0    plugins/flake/pathshapes/star/StarShape.cpp

https://commits.kde.org/krita/ba377491cdd4bc825de07035f7ed2e0a05545c84