Bug 299580

Summary: shapes should have a minimum size so they don't disappear
Product: [Applications] calligracommon Reporter: Antti Poikela <antti.poikela>
Component: generalAssignee: Calligra Bugs <calligra-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: alecail, cbo, franz.trischberger
Priority: NOR Keywords: release_blocker
Version: 2.4.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: patch of my work so far

Description Antti Poikela 2012-05-07 18:33:32 UTC
Application: calligrawords (2.4.1)
KDE Platform Version: 4.8.3 (4.8.3) "release 501"
Qt Version: 4.8.1
Operating System: Linux 3.1.10-1.9-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

In a blank document, I created a new geometric shape (e.g. a pentagon). I grabbed one of the shape resize handler with mouse and started resizing. Application crashed.

This is reproducible, though it may take a while -- just move the mouse around, constantly resizing the shape. If the shape suddenly disappears (as it sometimes does), create a new shape and resize that.

The crash can be reproduced every time.

-- Backtrace:
Application: Calligra Words (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f099ce50760 (LWP 17890))]

Thread 2 (Thread 0x7f0978bb0700 (LWP 17891)):
#0  0x00007f099a439ff3 in poll () from /lib64/libc.so.6
#1  0x00007f0997213a98 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007f0997213f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007f099baa72e6 in QEventDispatcherGlib::processEvents (this=0x7f09740008e0, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f099ba77012 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f099ba77267 in QEventLoop::exec (this=0x7f0978bafd30, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f099b977547 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f099ba56dff in QInotifyFileSystemWatcherEngine::run (this=0x89f7d0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f099b97a56b in QThreadPrivate::start (arg=0x89f7d0) at thread/qthread_unix.cpp:298
#9  0x00007f098c841b74 in ?? () from /usr/X11R6/lib64/libGL.so.1
#10 0x00007f099b6e2f05 in start_thread () from /lib64/libpthread.so.0
#11 0x00007f099a44310d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f099ce50760 (LWP 17890)):
[KCrash Handler]
#6  ref (this=0x407416f286bca1af) at ../../src/corelib/arch/qatomic_x86_64.h:121
#7  QCursor::operator= (this=0x7fff96a01f80, c=...) at kernel/qcursor.cpp:557
#8  0x00007f097bcc295c in DefaultTool::updateCursor (this=0x19817c0) at /usr/src/debug/calligra-2.4.1/plugins/defaultTools/defaulttool/DefaultTool.cpp:458
#9  0x00007f097bcc6bbb in DefaultTool::mouseMoveEvent (this=0x19817c0, event=<optimized out>) at /usr/src/debug/calligra-2.4.1/plugins/defaultTools/defaulttool/DefaultTool.cpp:547
#10 0x00007f0986ce79b2 in KoToolProxy::mouseMoveEvent (this=0x16cf090, event=0x7fff96a02a60, point=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoToolProxy.cpp:277
#11 0x00007f09802813f1 in KWCanvas::mouseMoveEvent (this=0x16cca30, e=0x7fff96a02a60) at /usr/src/debug/calligra-2.4.1/words/part/KWCanvas.cpp:85
#12 0x00007f099ac30818 in QWidget::event (this=0x16cca30, event=0x7fff96a02a60) at kernel/qwidget.cpp:8347
#13 0x00007f099abe00d4 in notify_helper (e=0x7fff96a02a60, receiver=0x16cca30, this=0x83cde0) at kernel/qapplication.cpp:4554
#14 QApplicationPrivate::notify_helper (this=0x83cde0, receiver=0x16cca30, e=0x7fff96a02a60) at kernel/qapplication.cpp:4526
#15 0x00007f099abe5823 in QApplication::notify (this=<optimized out>, receiver=0x16cca30, e=0x7fff96a02a60) at kernel/qapplication.cpp:4097
#16 0x00007f099c8388f6 in KApplication::notify (this=0x7fff96a03730, receiver=0x16cca30, event=0x7fff96a02a60) at /usr/src/debug/kdelibs-4.8.3/kdeui/kernel/kapplication.cpp:311
#17 0x00007f099ba7822c in QCoreApplication::notifyInternal (this=0x7fff96a03730, receiver=0x16cca30, event=0x7fff96a02a60) at kernel/qcoreapplication.cpp:876
#18 0x00007f099abe10a2 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#19 QApplicationPrivate::sendMouseEvent (receiver=0x16cca30, event=0x7fff96a02a60, alienWidget=0x16cca30, nativeWidget=0x103e110, buttonDown=0x16cca30, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3165
#20 0x00007f099ac5ce85 in QETWidget::translateMouseEvent (this=0x103e110, event=<optimized out>) at kernel/qapplication_x11.cpp:4513
#21 0x00007f099ac5bd4a in QApplication::x11ProcessEvent (this=0x7fff96a03730, event=0x7fff96a03320) at kernel/qapplication_x11.cpp:3636
#22 0x00007f099ac83ae2 in x11EventSourceDispatch (s=0x840a70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#23 0x00007f099721358d in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#24 0x00007f0997213d88 in ?? () from /usr/lib64/libglib-2.0.so.0
#25 0x00007f0997213f59 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#26 0x00007f099baa727f in QEventDispatcherGlib::processEvents (this=0x616770, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#27 0x00007f099ac8376e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#28 0x00007f099ba77012 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#29 0x00007f099ba77267 in QEventLoop::exec (this=0x7fff96a036f0, flags=...) at kernel/qeventloop.cpp:204
#30 0x00007f099ba7bdc5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#31 0x00007f09886210dd in kdemain (argc=<optimized out>, argv=0x6150b0) at /usr/src/debug/calligra-2.4.1/words/part/main.cpp:43
#32 0x00000000004088e4 in _start ()

Reported using DrKonqi
Comment 1 Camilla Boemann 2012-05-07 18:47:20 UTC
Thanks, I can confirm but it's important to use the top left handle of the bounding box
Comment 2 Camilla Boemann 2012-05-07 18:56:18 UTC
it takes a bit of patience to provoke, and seems related to the pathshape

At least I got a different bt once. Stupidly I didn't save that bt, but it was about the pathshape.

Ok here goes:
insert a hexagon
grap a corner and drag it around the diagonally opposite corner in a circular motion.
After a couple of rotations the shape disappears.
release mouse
undo
move mouse over one of the corner handles


the bt is a little bit different though:

Application: Calligra Words (calligrawords), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  0x00007f44eca64489 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007f44ec9f0753 in QCursor::~QCursor() () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#8  0x00007f44eca2c46f in QWidget::setCursor(QCursor const&) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007f44db59cee1 in KWCanvas::setCursor (this=0x1a70550, cursor=...) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:176
#10 0x00007f44ef91b12c in KoToolManager::Private::updateCursor (this=0x1cd7760, cursor=...) at /home/cbo/devel/calligra/libs/flake/KoToolManager.cpp:571
#11 0x00007f44ef91ed46 in KoToolManager::qt_static_metacall (_o=0x1cd76b0, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fff0c8a5e20) at /home/cbo/devel/buildcalligra/libs/flake/KoToolManager.moc:101
#12 0x00007f44ebaf7591 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#13 0x00007f44ef901b43 in KoToolBase::cursorChanged (this=0x2e3a160, _t1=...) at /home/cbo/devel/buildcalligra/libs/flake/KoToolBase.moc:146
#14 0x00007f44ef900fc4 in KoToolBase::useCursor (this=0x2e3a160, cursor=...) at /home/cbo/devel/calligra/libs/flake/KoToolBase.cpp:151
#15 0x00007f44d6c53c6c in DefaultTool::updateCursor (this=0x2e3a160) at /home/cbo/devel/calligra/plugins/defaultTools/defaulttool/DefaultTool.cpp:479
#16 0x00007f44d6c541da in DefaultTool::mouseMoveEvent (this=0x2e3a160, event=0x7fff0c8a6060) at /home/cbo/devel/calligra/plugins/defaultTools/defaulttool/DefaultTool.cpp:548
#17 0x00007f44ef927d56 in KoToolProxy::mouseMoveEvent (this=0x1cd7430, event=0x7fff0c8a6970, point=...) at /home/cbo/devel/calligra/libs/flake/KoToolProxy.cpp:277
#18 0x00007f44db59c3ea in KWCanvas::mouseMoveEvent (this=0x1a70550, e=0x7fff0c8a6970) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:85
#19 0x00007f44eca2f998 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#20 0x00007f44db59c734 in KWCanvas::event (this=0x1a70550, e=0x7fff0c8a6970) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:112
#21 0x00007f44ec9df204 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007f44ec9e4953 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007f44ed73db26 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#24 0x00007f44ebae31ac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#25 0x00007f44ec9e01d2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007f44eca5c635 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007f44eca5b4fa in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#28 0x00007f44eca83e62 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007f44e6d39853 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f44e6d39ba0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f44e6d39c64 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f44ebb126cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#33 0x00007f44eca83aee in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#34 0x00007f44ebae1f92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#35 0x00007f44ebae21e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#36 0x00007f44ebae7277 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#37 0x00007f44f08d309c in kdemain (argc=1, argv=0x7fff0c8a7808) at /home/cbo/devel/calligra/words/part/main.cpp:43
#38 0x00000000004008d6 in main (argc=1, argv=0x7fff0c8a7808) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3
Comment 3 Camilla Boemann 2012-05-07 19:12:33 UTC
I have investigated a bit more and it seems to be in line 317 where we might take atan2 of 0.0, 0.0 which is undefined

I inserted an assert and that proves this undefined condition occurs in this kind of scenario. Thinking about how to solve
Comment 4 Camilla Boemann 2012-05-07 19:22:52 UTC
I have fixed the original crash but my second bt can still happen and
Here is the other bt i talked about:

Application: Calligra Words (calligrawords), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  0x00007fcde4804475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x00007fcde48076f0 in *__GI_abort () at abort.c:92
#8  0x00007fcde536f86b in qt_message_output(QtMsgType, char const*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007fcde536fc1f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007fcde536fdc4 in qFatal(char const*, ...) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007fcde924f745 in KoPathShape::outline (this=0x46eb340) at /home/cbo/devel/calligra/libs/flake/KoPathShape.cpp:372
#12 0x00007fcde9256c2f in KoPathShape::pathStroke (this=0x46eb340, pen=...) at /home/cbo/devel/calligra/libs/flake/KoPathShape.cpp:1617
#13 0x00007fcde924fd84 in KoPathShape::boundingRect (this=0x46eb340) at /home/cbo/devel/calligra/libs/flake/KoPathShape.cpp:417
#14 0x00007fcde926ccaf in KoShape::update (this=0x46eb340) at /home/cbo/devel/calligra/libs/flake/KoShape.cpp:578
#15 0x00007fcde927cfde in KoShapeContainer::update (this=0x46eb340) at /home/cbo/devel/calligra/libs/flake/KoShapeContainer.cpp:232
#16 0x00007fcdd05fde46 in ShapeResizeStrategy::resizeBy (this=0x4a27a60, center=..., zoomX=-1.4807390407842176, zoomY=-0.042265224493919736) at /home/cbo/devel/calligra/plugins/defaultTools/defaulttool/ShapeResizeStrategy.cpp:232
#17 0x00007fcdd05fd62c in ShapeResizeStrategy::handleMouseMove (this=0x4a27a60, point=..., modifiers=...) at /home/cbo/devel/calligra/plugins/defaultTools/defaulttool/ShapeResizeStrategy.cpp:154
#18 0x00007fcde9331368 in KoInteractionTool::mouseMoveEvent (this=0x3b94c70, event=0x7fffffdb8a40) at /home/cbo/devel/calligra/libs/flake/tools/KoInteractionTool.cpp:61
#19 0x00007fcdd05e9ed9 in DefaultTool::mouseMoveEvent (this=0x3b94c70, event=0x7fffffdb8a40) at /home/cbo/devel/calligra/plugins/defaultTools/defaulttool/DefaultTool.cpp:513
#20 0x00007fcde92bdd56 in KoToolProxy::mouseMoveEvent (this=0x27cb880, event=0x7fffffdb9350, point=...) at /home/cbo/devel/calligra/libs/flake/KoToolProxy.cpp:277
#21 0x00007fcdd4f323ea in KWCanvas::mouseMoveEvent (this=0x27ca230, e=0x7fffffdb9350) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:85
#22 0x00007fcde63c5998 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007fcdd4f32734 in KWCanvas::event (this=0x27ca230, e=0x7fffffdb9350) at /home/cbo/devel/calligra/words/part/KWCanvas.cpp:112
#24 0x00007fcde6375204 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#25 0x00007fcde637a953 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007fcde70d3b26 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#27 0x00007fcde54791ac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#28 0x00007fcde63761d2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#29 0x00007fcde63f2635 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007fcde63f14fa in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007fcde6419e62 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007fcde06cf853 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fcde06cfba0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#34 0x00007fcde06cfc64 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007fcde54a86cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#36 0x00007fcde6419aee in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007fcde5477f92 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#38 0x00007fcde54781e7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#39 0x00007fcde547d277 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#40 0x00007fcdea26909c in kdemain (argc=1, argv=0x7fffffdba1e8) at /home/cbo/devel/calligra/words/part/main.cpp:43
#41 0x00000000004008d6 in main (argc=1, argv=0x7fffffdba1e8) at /home/cbo/devel/buildcalligra/words/part/calligrawords_dummy.cpp:3
Comment 5 Camilla Boemann 2012-05-07 21:14:53 UTC
last bt is easy to reproduce - just have a pathshape then drag the bottom left corner up slowly so  the height becomes 0.

it's not a devision by zero, but because the interactive resizing doesn't restore the original but rather apply an inverse matrix there is an accumulated wrongness.

very fast the size becomes big (shape disappears from screen) and the becomes infinite and we have the crash

I tried settting the original m_oldTransform[i] but although the crassh is fixed there is something wrong with the translation
Comment 6 Camilla Boemann 2012-05-07 21:17:38 UTC
Created attachment 70937 [details]
patch of my work so far

here is the work so far
Comment 7 Franz Trischberger 2012-05-08 06:44:51 UTC
(In reply to comment #5)
> last bt is easy to reproduce - just have a pathshape then drag the bottom
> left corner up slowly so  the height becomes 0.

When I follow these steps (using karbon), I get this backtrace:
[KCrash Handler]
#6  QCursor::shape (this=<optimized out>) at kernel/qcursor.cpp:450
#7  0x00007f308892538f in QWidget::setCursor (this=0x1d939b0, cursor=...) at kernel/qwidget.cpp:5099
#8  0x00007f30781ec5bf in KarbonCanvas::setCursor (this=0x1d939b0, cursor=...) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/karbon/ui/widgets/KarbonCanvas.cpp:457
#9  0x00007f30775f6586 in KoToolManager::Private::updateCursor (this=0x1da0710, cursor=...) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/libs/flake/KoToolManager.cpp:571
#10 0x00007f30775f9f01 in KoToolManager::qt_static_metacall (_o=0x1da0a50, _c=QMetaObject::InvokeMetaMethod, _id=13, _a=0x7fff87723400) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1_build/libs/flake/KoToolManager.moc:101
#11 0x00007f3089753e79 in QMetaObject::activate (sender=0x25ffbe0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff87723400) at kernel/qobject.cpp:3547
#12 0x00007f30775ddf9b in KoToolBase::cursorChanged (this=0x25ffbe0, _t1=...) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1_build/libs/flake/KoToolBase.moc:146
#13 0x00007f30775dd48c in KoToolBase::useCursor (this=0x25ffbe0, cursor=...) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/libs/flake/KoToolBase.cpp:151
#14 0x00007f306f4b6f12 in DefaultTool::updateCursor (this=0x25ffbe0) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/plugins/defaultTools/defaulttool/DefaultTool.cpp:478
#15 0x00007f306f4b7480 in DefaultTool::mouseMoveEvent (this=0x25ffbe0, event=0x7fff87723640) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/plugins/defaultTools/defaulttool/DefaultTool.cpp:547
#16 0x00007f3077602baa in KoToolProxy::mouseMoveEvent (this=0x1d0e080, event=0x7fff87724180, point=...) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/libs/flake/KoToolProxy.cpp:277
#17 0x00007f30781eb073 in KarbonCanvas::mouseMoveEvent (this=0x1d939b0, e=0x7fff87724180) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/karbon/ui/widgets/KarbonCanvas.cpp:213
#18 0x00007f308892c5cd in QWidget::event (this=0x1d939b0, event=0x7fff87724180) at kernel/qwidget.cpp:8347
#19 0x00007f30781ea7ee in KarbonCanvas::event (this=0x1d939b0, e=0x7fff87724180) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/karbon/ui/widgets/KarbonCanvas.cpp:144
#20 0x00007f30888d9cc4 in notify_helper (e=0x7fff87724180, receiver=0x1d939b0, this=0x11a4480) at kernel/qapplication.cpp:4554
#21 QApplicationPrivate::notify_helper (this=0x11a4480, receiver=0x1d939b0, e=0x7fff87724180) at kernel/qapplication.cpp:4526
#22 0x00007f30888dfe49 in QApplication::notify (this=<optimized out>, receiver=0x1d939b0, e=0x7fff87724180) at kernel/qapplication.cpp:4097
#23 0x00007f308a51eb16 in KApplication::notify (this=0x7fff87724c80, receiver=0x1d939b0, event=0x7fff87724180) at /var/tmp/paludis/kde-base-kdelibs-4.8.3/work/kdelibs-4.8.3/kdeui/kernel/kapplication.cpp:311
#24 0x00007f308974053c in QCoreApplication::notifyInternal (this=0x7fff87724c80, receiver=0x1d939b0, event=0x7fff87724180) at kernel/qcoreapplication.cpp:876
#25 0x00007f30888dac82 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#26 QApplicationPrivate::sendMouseEvent (receiver=0x1d939b0, event=0x7fff87724180, alienWidget=0x0, nativeWidget=0x1d939b0, buttonDown=0x0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3165
#27 0x00007f3088955618 in QETWidget::translateMouseEvent (this=0x1d939b0, event=<optimized out>) at kernel/qapplication_x11.cpp:4502
#28 0x00007f308895442a in QApplication::x11ProcessEvent (this=0x7fff87724c80, event=0x7fff877248a0) at kernel/qapplication_x11.cpp:3625
#29 0x00007f308897b8fa in x11EventSourceDispatch (s=0x11a6c70, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#30 0x00007f308533c123 in g_main_dispatch (context=0x11a5900) at gmain.c:2539
#31 g_main_context_dispatch (context=0x11a5900) at gmain.c:3075
#32 0x00007f308533c470 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x11a5900, self=<optimized out>) at gmain.c:3146
#33 g_main_context_iterate (context=0x11a5900, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3083
#34 0x00007f308533c534 in g_main_context_iteration (context=0x11a5900, may_block=1) at gmain.c:3207
#35 0x00007f308976e92f in QEventDispatcherGlib::processEvents (this=0x10197d0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#36 0x00007f308897b59e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x00007f308973f352 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#38 0x00007f308973f5a7 in QEventLoop::exec (this=0x7fff87724c30, flags=...) at kernel/qeventloop.cpp:204
#39 0x00007f3089743fd5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#40 0x00007f307841eed1 in kdemain (argc=1, argv=0x10197b0) at /var/tmp/paludis/app-office-calligra-2.4.1/work/calligra-2.4.1/karbon/main.cpp:50
#41 0x00000000004089d4 in launch (argc=1, _name=0x1092558 "/usr/bin/karbon", args=<optimized out>, cwd=0x0, envc=<optimized out>, envs=<optimized out>, reset_env=false, tty=0x0, avoid_loops=false, startup_id_str=0x1092583 "desktop_franz;1336458719;397108;2464_TIME4066396") at /var/tmp/paludis/kde-base-kdelibs-4.8.3/work/kdelibs-4.8.3/kinit/kinit.cpp:734
#42 0x0000000000409ab6 in handle_launcher_request (sock=7, who=<optimized out>) at /var/tmp/paludis/kde-base-kdelibs-4.8.3/work/kdelibs-4.8.3/kinit/kinit.cpp:1226
#43 0x0000000000409fdf in handle_requests (waitForPid=0) at /var/tmp/paludis/kde-base-kdelibs-4.8.3/work/kdelibs-4.8.3/kinit/kinit.cpp:1419
#44 0x0000000000405a2e in main (argc=2, argv=0x7fff87725a40, envp=0x7fff87725d10) at /var/tmp/paludis/kde-base-kdelibs-4.8.3/work/kdelibs-4.8.3/kinit/kinit.cpp:1907
Comment 8 Halla Rempt 2012-05-08 06:51:33 UTC
*** Bug 297747 has been marked as a duplicate of this bug. ***
Comment 9 Franz Trischberger 2012-05-08 07:40:00 UTC
(In reply to comment #5)
> last bt is easy to reproduce - just have a pathshape then drag the bottom
> left corner up slowly so  the height becomes 0.
I get your BT only, when I drag TOP left corner downwards.
For my BT, I simply added a qDebug() << rotOctant << m_angle; in DefaultTool.cpp:431 ->

17 45 
17 45 
17 45 
17 45 
17 45 
17 45 
-2147483640 nan 
-> crash, as the index for m_sizeCursors for sure is out of bounds, leading to a not-valid QCursor-Object.
Comment 10 Camilla Boemann 2012-05-08 09:10:25 UTC
for your last crash there is a fix in the attached patch - doesn't do much good though as there are just different crashes that come up. But it fixes that cursor crash.
Comment 11 Jan Hambrecht 2012-07-02 09:54:52 UTC
*** Bug 297738 has been marked as a duplicate of this bug. ***
Comment 12 Halla Rempt 2013-12-12 15:57:45 UTC
Did the fix for the cursor crash get pushed already? I seem to remember working on that as well.
Comment 13 Halla Rempt 2013-12-12 16:03:06 UTC
I cannot reproduce the crash anymore, but I can disappear the shape completely:

karbon(2751)/koffice (lib komain) KoRTree<T>::insertHelper: KoRTree::insert boundingBox isNull setting size to QSizeF(0.0001, 0.0001

Shapes _should_ have a minimum size.
Comment 14 Justin Zobel 2021-03-09 01:22:25 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.