Bug 306133 - karbon, create a path with 2 points, try to change x end by properties = crash
Summary: karbon, create a path with 2 points, try to change x end by properties = crash
Status: RESOLVED FIXED
Alias: None
Product: calligracommon
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: T Zachmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-01 13:08 UTC by Bruno Friedmann
Modified: 2012-09-05 19:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Document that can crash (54.85 KB, application/octet-stream)
2012-09-03 20:31 UTC, Bruno Friedmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Friedmann 2012-09-01 13:08:36 UTC
Application: karbon (2.4.1)
KDE Platform Version: 4.8.5 (4.8.5) "release 521"
Qt Version: 4.8.2
Operating System: Linux 3.1.10-1.16-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:
on a complex draw, once a path has been created and odg saved, then if you want to enlarge that path by changing its x,y properties you get a crash.

The crash can be reproduced every time.

-- Backtrace:
Application: Karbon (kdeinit4), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f9fdf51b760 (LWP 23505))]

Thread 2 (Thread 0x7f9fbaeea700 (LWP 23890)):
#0  0x00007f9fdcb12ff3 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f9fd96d5ae8 in g_main_context_poll (n_fds=1, fds=0x7f9fac1e4b20, timeout=-1, context=0x7f9fac1f2520, priority=<optimized out>) at gmain.c:3386
#2  g_main_context_iterate (context=0x7f9fac1f2520, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3068
#3  0x00007f9fd96d5fa9 in g_main_context_iteration (context=0x7f9fac1f2520, may_block=1) at gmain.c:3136
#4  0x00007f9fde181e36 in QEventDispatcherGlib::processEvents (this=0x7f9fac192890, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007f9fde151842 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f9fde151a97 in QEventLoop::exec (this=0x7f9fbaee9d30, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f9fde0515f7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00007f9fde13162f in QInotifyFileSystemWatcherEngine::run (this=0x9281b0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007f9fde05461b in QThreadPrivate::start (arg=0x9281b0) at thread/qthread_unix.cpp:307
#10 0x00007f9fcede8734 in ?? () from /usr/X11R6/lib64/libGL.so.1
#11 0x00007f9fdddbcf05 in start_thread (arg=0x7f9fbaeea700) at pthread_create.c:301
#12 0x00007f9fdcb1c10d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f9fdf51b760 (LWP 23505)):
[KCrash Handler]
#6  mUSABLe (mem=0x8e10810) at malloc.c:5906
#7  __malloc_usable_size (m=0x8e10810) at malloc.c:4213
#8  0x00007f9fcede9533 in ?? () from /usr/X11R6/lib64/libGL.so.1
#9  0x00007f9fce250cc1 in ?? () from /usr/lib64/tls/libnvidia-tls.so.304.43
#10 0x00007f9fc9ac8189 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x8ce6d90, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:799
#11 0x00007f9fc9ac8209 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x8ce6d90, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:801
#12 0x00007f9fc9ac8189 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x8e429e0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:799
#13 0x00007f9fc9ac8209 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x8e429e0, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:801
#14 0x00007f9fc9ac8189 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x1044540, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:799
#15 0x00007f9fc9ac8209 in KoRTree<KoShape*>::NonLeafNode::~NonLeafNode (this=0x1044540, __in_chrg=<optimized out>, __vtt_parm=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:801
#16 0x00007f9fc9ac6e3d in KoRTree<KoShape*>::~KoRTree (this=0x8aff010, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoRTree.h:348
#17 0x00007f9fc9ac1cea in ~Private (this=0x8afeff0, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapeManager.cpp:61
#18 KoShapeManager::~KoShapeManager (this=0x8b1f040, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapeManager.cpp:195
#19 0x00007f9fc9ac1d39 in KoShapeManager::~KoShapeManager (this=0x8b1f040, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapeManager.cpp:196
#20 0x00007f9fc9acb90d in ~SimpleCanvas (this=0x895cc40, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapePainter.cpp:47
#21 SimpleCanvas::~SimpleCanvas (this=<optimized out>, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapePainter.cpp:48
#22 0x00007f9fc9acb20a in ~Private (this=<optimized out>, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapePainter.cpp:117
#23 KoShapePainter::~KoShapePainter (this=0x7ffffc754f20, __in_chrg=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/flake/KoShapePainter.cpp:132
#24 0x00007f9fca61eb21 in KarbonLayerModel::createThumbnail (this=<optimized out>, shape=0xbfa7f0, thumbSize=...) at /usr/src/debug/calligra-2.4.1/karbon/ui/dockers/KarbonLayerModel.cpp:315
#25 0x00007f9fca62116e in KarbonLayerModel::data (this=<optimized out>, index=<optimized out>, role=<optimized out>) at /usr/src/debug/calligra-2.4.1/karbon/ui/dockers/KarbonLayerModel.cpp:203
#26 0x00007f9fdd860a2c in QSortFilterProxyModel::data (this=<optimized out>, index=..., role=133) at itemviews/qsortfilterproxymodel.cpp:1718
#27 0x00007f9fca33e2b0 in data (arole=<optimized out>, this=0x7ffffc7555d0) at /usr/include/QtCore/qabstractitemmodel.h:402
#28 KoDocumentSectionDelegate::drawThumbnail (this=<optimized out>, p=0x7ffffc755970, option=..., index=...) at /usr/src/debug/calligra-2.4.1/libs/main/KoDocumentSectionDelegate.cpp:462
#29 0x00007f9fca33f948 in KoDocumentSectionDelegate::paint (this=0x7e94170, p=0x7ffffc755970, o=..., index=...) at /usr/src/debug/calligra-2.4.1/libs/main/KoDocumentSectionDelegate.cpp:93
#30 0x00007f9fdd81c195 in QTreeView::drawRow (this=0x7f03800, painter=0x7ffffc755970, option=..., index=...) at itemviews/qtreeview.cpp:1717
#31 0x00007f9fdd81f318 in QTreeView::drawTree (this=0x7f03800, painter=0x7ffffc755970, region=<optimized out>) at itemviews/qtreeview.cpp:1470
#32 0x00007f9fdd81fc90 in QTreeView::paintEvent (this=0x7f03800, event=0x7ffffc756a80) at itemviews/qtreeview.cpp:1275
#33 0x00007f9fca342ba7 in KoDocumentSectionView::paintEvent (this=0x7f03800, event=<optimized out>) at /usr/src/debug/calligra-2.4.1/libs/main/KoDocumentSectionView.cpp:289
#34 0x00007f9fdd3095f6 in QWidget::event (this=0x7f03800, event=0x7ffffc756a80) at kernel/qwidget.cpp:8517
#35 0x00007f9fdd6c51d6 in QFrame::event (this=0x7f03800, e=0x7ffffc756a80) at widgets/qframe.cpp:557
#36 0x00007f9fdd7d981b in QAbstractItemView::viewportEvent (this=0x7f03800, event=0x7ffffc756a80) at itemviews/qabstractitemview.cpp:1644
#37 0x00007f9fdd8215a5 in QTreeView::viewportEvent (this=0x7f03800, event=0x7ffffc756a80) at itemviews/qtreeview.cpp:1257
#38 0x00007f9fca34226b in KoDocumentSectionView::viewportEvent (this=0x7f03800, e=0x7ffffc756a80) at /usr/src/debug/calligra-2.4.1/libs/main/KoDocumentSectionView.cpp:154
#39 0x00007f9fde152e98 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x7f47310, event=0x7ffffc756a80) at kernel/qcoreapplication.cpp:1025
#40 0x00007f9fdd2b8faf in notify_helper (e=0x7ffffc756a80, receiver=0x7f47310, this=0x894550) at kernel/qapplication.cpp:4547
#41 QApplicationPrivate::notify_helper (this=0x894550, receiver=0x7f47310, e=0x7ffffc756a80) at kernel/qapplication.cpp:4523
#42 0x00007f9fdd2bddb3 in QApplication::notify (this=0x7ffffc759340, receiver=0x7f47310, e=0x7ffffc756a80) at kernel/qapplication.cpp:4412
#43 0x00007f9fdef19156 in KApplication::notify (this=0x7ffffc759340, receiver=0x7f47310, event=0x7ffffc756a80) at /usr/src/debug/kdelibs-4.8.5/kdeui/kernel/kapplication.cpp:311
#44 0x00007f9fde152d0c in QCoreApplication::notifyInternal (this=0x7ffffc759340, receiver=0x7f47310, event=0x7ffffc756a80) at kernel/qcoreapplication.cpp:915
#45 0x00007f9fdd305296 in sendSpontaneousEvent (event=0x7ffffc756a80, receiver=0x7f47310) at ../../src/corelib/kernel/qcoreapplication.h:234
#46 QWidgetPrivate::drawWidget (this=0x7ed7b70, pdev=0xb8be40, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5594
#47 0x00007f9fdd305f0f in QWidgetPrivate::paintSiblingsRecursive (this=0x7b9ca10, pdev=0xb8be40, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5803
#48 0x00007f9fdd305c97 in QWidgetPrivate::paintSiblingsRecursive (this=0x7b9ca10, pdev=0xb8be40, siblings=..., index=4, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5790
#49 0x00007f9fdd305c97 in QWidgetPrivate::paintSiblingsRecursive (this=0x7b9ca10, pdev=0xb8be40, siblings=..., index=5, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5790
#50 0x00007f9fdd305c97 in QWidgetPrivate::paintSiblingsRecursive (this=0x7b9ca10, pdev=0xb8be40, siblings=..., index=6, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5790
#51 0x00007f9fdd305c97 in QWidgetPrivate::paintSiblingsRecursive (this=0x7b9ca10, pdev=0xb8be40, siblings=..., index=7, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5790
#52 0x00007f9fdd304fcc in QWidgetPrivate::drawWidget (this=0x7b9ca10, pdev=0xb8be40, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5647
#53 0x00007f9fdd305f0f in QWidgetPrivate::paintSiblingsRecursive (this=0x7ed1b50, pdev=0xb8be40, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5803
#54 0x00007f9fdd304fcc in QWidgetPrivate::drawWidget (this=0x7ed1b50, pdev=0xb8be40, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5647
#55 0x00007f9fdd305f0f in QWidgetPrivate::paintSiblingsRecursive (this=0x7f18ac0, pdev=0xb8be40, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5803
#56 0x00007f9fdd304fcc in QWidgetPrivate::drawWidget (this=0x7f18ac0, pdev=0xb8be40, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5647
#57 0x00007f9fdd305f0f in QWidgetPrivate::paintSiblingsRecursive (this=0xb74200, pdev=0xb8be40, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5803
#58 0x00007f9fdd304fcc in QWidgetPrivate::drawWidget (this=0xb74200, pdev=0xb8be40, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0xd3dd40) at kernel/qwidget.cpp:5647
#59 0x00007f9fdd4d1a18 in QWidgetBackingStore::sync (this=0xd3dd40) at painting/qbackingstore.cpp:1373
#60 0x00007f9fdd2fbff0 in QWidgetPrivate::syncBackingStore (this=0xb74200) at kernel/qwidget.cpp:1892
#61 0x00007f9fdd309b0c in QWidget::event (this=0xb74100, event=0x895dff0) at kernel/qwidget.cpp:8664
#62 0x00007f9fdd6dec3b in QMainWindow::event (this=0xb74100, event=0x895dff0) at widgets/qmainwindow.cpp:1478
#63 0x00007f9fdf015348 in KXmlGuiWindow::event (this=0xb74100, ev=0x895dff0) at /usr/src/debug/kdelibs-4.8.5/kdeui/xmlgui/kxmlguiwindow.cpp:126
#64 0x00007f9fdd2b8fe4 in notify_helper (e=0x895dff0, receiver=0xb74100, this=0x894550) at kernel/qapplication.cpp:4551
#65 QApplicationPrivate::notify_helper (this=0x894550, receiver=0xb74100, e=0x895dff0) at kernel/qapplication.cpp:4523
#66 0x00007f9fdd2bddb3 in QApplication::notify (this=0x7ffffc759340, receiver=0xb74100, e=0x895dff0) at kernel/qapplication.cpp:4412
#67 0x00007f9fdef19156 in KApplication::notify (this=0x7ffffc759340, receiver=0xb74100, event=0x895dff0) at /usr/src/debug/kdelibs-4.8.5/kdeui/kernel/kapplication.cpp:311
#68 0x00007f9fde152d0c in QCoreApplication::notifyInternal (this=0x7ffffc759340, receiver=0xb74100, event=0x895dff0) at kernel/qcoreapplication.cpp:915
#69 0x00007f9fde1565ba in sendEvent (event=0x895dff0, receiver=0xb74100) at kernel/qcoreapplication.h:231
#70 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x6153d0) at kernel/qcoreapplication.cpp:1539
#71 0x00007f9fde1819a3 in sendPostedEvents () at kernel/qcoreapplication.h:236
#72 postEventSourceDispatch (s=0x896780) at kernel/qeventdispatcher_glib.cpp:279
#73 0x00007f9fd96d55dd in g_main_dispatch (context=0x896690) at gmain.c:2425
#74 g_main_context_dispatch (context=0x896690) at gmain.c:2995
#75 0x00007f9fd96d5dd8 in g_main_context_iterate (context=0x896690, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3073
#76 0x00007f9fd96d5fa9 in g_main_context_iteration (context=0x896690, may_block=1) at gmain.c:3136
#77 0x00007f9fde181dcf in QEventDispatcherGlib::processEvents (this=0x616770, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#78 0x00007f9fdd35c69e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#79 0x00007f9fde151842 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#80 0x00007f9fde151a97 in QEventLoop::exec (this=0x7ffffc759300, flags=...) at kernel/qeventloop.cpp:204
#81 0x00007f9fde1568b5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#82 0x00007f9fca883e15 in kdemain (argc=<optimized out>, argv=0x7580f0) at /usr/src/debug/calligra-2.4.1/karbon/main.cpp:50
#83 0x00000000004088e4 in launch (argc=2, _name=0x6f9478 "/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=0x6f94e4 "c-3po;1346494114;117303;3883_TIME7947873") at /usr/src/debug/kdelibs-4.8.5/kinit/kinit.cpp:734
#84 0x00000000004099e6 in handle_launcher_request (sock=8, who=<optimized out>) at /usr/src/debug/kdelibs-4.8.5/kinit/kinit.cpp:1226
#85 0x0000000000409f27 in handle_requests (waitForPid=0) at /usr/src/debug/kdelibs-4.8.5/kinit/kinit.cpp:1419
#86 0x00000000004057a7 in main (argc=4, argv=0x7fff00000001, envp=0x7ffffc75a620) at /usr/src/debug/kdelibs-4.8.5/kinit/kinit.cpp:1907

Reported using DrKonqi
Comment 1 T Zachmann 2012-09-02 04:20:08 UTC
Thanks for the bug report. I tried to reproduce the problem with current master which should be nearly the same as the 2.5 version but I could not reproduce. Here some questions that might help us to reproduce the problem.

o Does this only happen with this one document? If so can you please attach it to the bug report or it contains sensitive data mail it to me?

o How exactly do you enlarge the path. Do you use the tool option docker when the default tool(arrow) is selected or do you use the mouse on the top left corner to resize.
Comment 2 Bruno Friedmann 2012-09-03 20:28:16 UTC
I will add the document, not that sensitive ....

I tried by two method, clic on a point in the path ( used as line by me ) and try to extend it (hard by mouse).
And by using the shape properties docker by editing the value.
Comment 3 Bruno Friedmann 2012-09-03 20:31:24 UTC
Created attachment 73634 [details]
Document that can crash

Trying to edit any path that serve as measurement will crash karbon.
Especially if you play with the shape properties x,y 

Or if you "interleave" the line ... hard to describe :-)
Comment 4 T Zachmann 2012-09-04 14:53:42 UTC
Moving to correct component as all Calligra apps are affected.

Review for patch created:

https://git.reviewboard.kde.org/r/106327/
Comment 5 Bruno Friedmann 2012-09-05 05:04:53 UTC
*** Bug 305427 has been marked as a duplicate of this bug. ***
Comment 6 T Zachmann 2012-09-05 19:04:42 UTC
Git commit 0cfb997dca096dc388d9150e3a031595c73fcd24 by Thorsten Zachmann.
Committed on 05/09/2012 at 21:02.
Pushed by zachmann into branch 'master'.

Fix resizing of horizontal/vertical lines

When resizing a horizontal or vertical line with the tool options calligra
applications crash. This fixes that by setting the scaling for width/height
to 1 if division by 0 would occur.

REVIEW: 106327

M  +2    -1    plugins/defaultTools/defaulttool/DefaultToolWidget.cpp

http://commits.kde.org/calligra/0cfb997dca096dc388d9150e3a031595c73fcd24
Comment 7 T Zachmann 2012-09-05 19:22:07 UTC
Git commit 439cc1795d63a3a32b970ec106b016c5e91c1478 by Thorsten Zachmann.
Committed on 05/09/2012 at 21:02.
Pushed by zachmann into branch 'calligra/2.5'.

Fix resizing of horizontal/vertical lines

When resizing a horizontal or vertical line with the tool options calligra
applications crash. This fixes that by setting the scaling for width/height
to 1 if division by 0 would occur.

REVIEW: 106327
(cherry picked from commit 0cfb997dca096dc388d9150e3a031595c73fcd24)

M  +2    -1    plugins/defaultTools/defaulttool/DefaultToolWidget.cpp

http://commits.kde.org/calligra/439cc1795d63a3a32b970ec106b016c5e91c1478