Bug 194453 - crash while using freehand drawing tool
Summary: crash while using freehand drawing tool
Status: RESOLVED FIXED
Alias: None
Product: karbon
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Jan Hambrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 18:21 UTC by zOOm_ER
Modified: 2024-09-10 17:47 UTC (History)
1 user (show)

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


Attachments
karbon crash (64.25 KB, image/png)
2009-05-28 18:23 UTC, zOOm_ER
Details
karbon crash (59.45 KB, image/png)
2009-05-28 18:23 UTC, zOOm_ER
Details
karbon crash-3 (133.51 KB, image/png)
2009-05-29 18:06 UTC, zOOm_ER
Details
karbon crash-4 (83.48 KB, image/png)
2009-05-29 18:17 UTC, zOOm_ER
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zOOm_ER 2009-05-28 18:21:52 UTC
Application that crashed: karbon
Version of the application: 2.0.0
KDE Version: 4.2.86 (KDE 4.2.86 (KDE 4.3 >= 20090514)) "release 126"
Qt Version: 4.5.2
Operating System: Linux 2.6.29.1-5-default i686
Distribution: "openSUSE 11.1 (i586)"

What I was doing when the application crashed:
 Description:
When i try to draw some rather complex figure with "freehand drawing tool", i always get karbon unresponsible, while eating cpu and memory. After some time it crashes.
 Steps to reproduce:
Start karbon, and try to draw complex figure with "freehand drawing tool". 
 Notes:
Creating simple figures (which take about few seconds from user to draw) works ok. I can't say exactly, where is the border between simple figures and complex, but maybe screenshots give some help. On both screenshots karbon crashed while drawing bottommost figure. (figures above drawed perfectly).
And... it does not necessarily be closed shape - i got crashes even not closing the line.

 -- Backtrace:
Application: Karbon14 (kdeinit), signal: Segmentation fault
[KCrash Handler]
#6  QVector<QPointF>::realloc (this=0xbfba7f14, asize=67108863, aalloc=134217727) at ../../src/corelib/thread/qbasicatomic.h:87
#7  0xb6927a3c in QVector<QPointF>::append (this=0xbfba7f14, t=@0xbfba7d48) at ../../src/corelib/tools/qvector.h:525
#8  0xb6922e9b in QBezier::addToPolygon (this=0xbfba7e10, polygon=0xbfba7f14) at painting/qbezier.cpp:224
#9  0xb696c2d4 in QPainterPath::toSubpathPolygons (this=0xbfba816c, matrix=@0xbfba804c) at painting/qpainterpath.cpp:1496
#10 0xb696d597 in QPainterPath::toFillPolygons (this=0xbfba816c, matrix=@0xbfba804c) at painting/qpainterpath.cpp:1553
#11 0xb696e272 in QPainterPath::toFillPolygons (this=0xbfba816c, matrix=@0xbfba8108) at painting/qpainterpath.cpp:1648
#12 0xb6a08284 in QX11PaintEnginePrivate::fillPath (this=0x82a6fd8, path=@0xbfba92dc, gc_mode=QX11PaintEnginePrivate::PenGC, transform=false) at painting/qpaintengine_x11.cpp:1741
#13 0xb6a08a67 in QX11PaintEngine::drawPath (this=0x8257460, path=@0xbfba9374) at painting/qpaintengine_x11.cpp:1796
#14 0xb69659ec in QPainter::drawPath (this=0xbfba9654, path=@0xbfba9374) at painting/qpainter.cpp:3214
#15 0xb6967c4d in QPainter::strokePath (this=0xbfba9654, path=@0xbfba9374, pen=@0xbfba9378) at painting/qpainter.cpp:3126
#16 0xb3fd5ebc in KoLineBorder::paintBorder(KoShape*, QPainter&, KoViewConverter const&) () from /usr/lib/libflake.so.5
#17 0xb3fa7802 in KoShapeManager::paintShape(KoShape*, QPainter&, KoViewConverter const&, bool) () from /usr/lib/libflake.so.5
#18 0xb3fa731a in KoShapeManagerPaintingStrategy::paint(KoShape*, QPainter&, KoViewConverter const&, bool) () from /usr/lib/libflake.so.5
#19 0xb3faa16a in KoShapeManager::paint(QPainter&, KoViewConverter const&, bool) () from /usr/lib/libflake.so.5
#20 0xb4592f8f in ?? () from /usr/lib/libkarbonui.so.5
#21 0xb68832ae in QWidget::event (this=0x892d948, event=0xbfba9ae4) at kernel/qwidget.cpp:7686
#22 0xb682c8ec in QApplicationPrivate::notify_helper (this=0x80bf6a0, receiver=0x892d948, e=0xbfba9ae4) at kernel/qapplication.cpp:4056
#23 0xb6834cc2 in QApplication::notify (this=0xbfbaa5fc, receiver=0x892d948, e=0xbfba9ae4) at kernel/qapplication.cpp:4021
#24 0xb731db8d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#25 0xb7e6c08b in QCoreApplication::notifyInternal (this=0xbfbaa5fc, receiver=0x892d948, event=0xbfba9ae4) at kernel/qcoreapplication.cpp:610
#26 0xb6837a2e in QCoreApplication::sendSpontaneousEvent (receiver=0x892d948, event=0xbfba7f14) at ../../src/corelib/kernel/qcoreapplication.h:216
#27 0xb688b019 in QWidgetPrivate::drawWidget (this=0x8945a90, pdev=0x81febec, rgn=@0xbfba9d10, offset=@0xbfba9ce0, flags=68, sharedPainter=0x0, backingStore=0x8225328) at kernel/qwidget.cpp:5079
#28 0xb6a1ab65 in QWidgetBackingStore::sync (this=0x8225328) at painting/qbackingstore.cpp:1261
#29 0xb687b576 in QWidgetPrivate::syncBackingStore (this=0x822c000) at kernel/qwidget.cpp:1603
#30 0xb6883715 in QWidget::event (this=0x822b078, event=0x82a5bd8) at kernel/qwidget.cpp:7826
#31 0xb6c31db7 in QMainWindow::event (this=0x822b078, event=0x82a5bd8) at widgets/qmainwindow.cpp:1399
#32 0xb7402147 in KMainWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#33 0xb744751c in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#34 0xb682c8ec in QApplicationPrivate::notify_helper (this=0x80bf6a0, receiver=0x822b078, e=0x82a5bd8) at kernel/qapplication.cpp:4056
#35 0xb6834cc2 in QApplication::notify (this=0xbfbaa5fc, receiver=0x822b078, e=0x82a5bd8) at kernel/qapplication.cpp:4021
#36 0xb731db8d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#37 0xb7e6c08b in QCoreApplication::notifyInternal (this=0xbfbaa5fc, receiver=0x822b078, event=0x82a5bd8) at kernel/qcoreapplication.cpp:610
#38 0xb7e6ccd5 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x805a990) at kernel/qcoreapplication.h:213
#39 0xb7e6cecd in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1140
#40 0xb7e97baf in postEventSourceDispatch (s=0x80c1920) at kernel/qcoreapplication.h:218
#41 0xb63c89c8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#42 0xb63cc083 in ?? () from /usr/lib/libglib-2.0.so.0
#43 0xb63cc241 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#44 0xb7e977f8 in QEventDispatcherGlib::processEvents (this=0x80bf680, flags={i = -1078287096}) at kernel/qeventdispatcher_glib.cpp:327
#45 0xb68cca15 in QGuiEventDispatcherGlib::processEvents (this=0x80bf680, flags={i = -1078287048}) at kernel/qguieventdispatcher_glib.cpp:202
#46 0xb7e6a6aa in QEventLoop::processEvents (this=0xbfbaa5b0, flags={i = -1078286984}) at kernel/qeventloop.cpp:149
#47 0xb7e6aaf2 in QEventLoop::exec (this=0xbfbaa5b0, flags={i = -1078286920}) at kernel/qeventloop.cpp:201
#48 0xb7e6cf99 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#49 0xb682c767 in QApplication::exec () at kernel/qapplication.cpp:3525
#50 0xb7f67bc4 in kdemain () from /usr/lib/libkdeinit4_karbon.so
#51 0x0804e270 in _start ()
Comment 1 zOOm_ER 2009-05-28 18:23:04 UTC
Created attachment 34079 [details]
karbon crash
Comment 2 zOOm_ER 2009-05-28 18:23:41 UTC
Created attachment 34080 [details]
karbon crash
Comment 3 Jan Hambrecht 2009-05-28 23:35:10 UTC
This appears to be a crash in Qt. From your version information i see you are using qt-4.5.2 which is not released yet. Would be nice if you can check if the latest released version also crashes. I have qt-4.5.1 which does not have that problem.
Comment 4 zOOm_ER 2009-05-29 18:05:20 UTC
i downgraded to qt 4.5.1, and still have this bug.
i have no debugs symbols for this qt version, but obviously it is the same place inside qt:

Application: Karbon14 (kdeinit), signal: Segmentation fault
[KCrash Handler]
#6  0xb6a12c7f in ?? () from /usr/lib/libQtGui.so.4
#7  0xb6a527ec in ?? () from /usr/lib/libQtGui.so.4
#8  0xb6a4dc4b in QBezier::addToPolygon(QPolygonF*) const () from /usr/lib/libQtGui.so.4
......

on the third screenshot qt version can be seen, and how much memory karbon eats when it finally throw crash message.
Comment 5 zOOm_ER 2009-05-29 18:06:25 UTC
Created attachment 34111 [details]
karbon crash-3
Comment 6 zOOm_ER 2009-05-29 18:16:48 UTC
I discovered, that it crashes every time, when you draw shape, which has lots of peaks. Smooth shapes created without troubles.

this can be seen on fourth screenshot:
upper figure was drawn ok, crash occurs on the bottommost shape.
Comment 7 zOOm_ER 2009-05-29 18:17:21 UTC
Created attachment 34114 [details]
karbon crash-4
Comment 8 Jan Hambrecht 2009-05-30 00:23:48 UTC
Ok the problems with spiky path was reported already some time ago. Confirmed.
Comment 9 Jan Hambrecht 2009-05-31 20:51:12 UTC
SVN commit 976047 by jaham:

fix some division by zero problems when fitting bezier curves
I am closing bug 194453 which i think is solved by that fix.
If that is not the case, please reopen.

BUG: 194453



 M  +26 -10    KarbonCurveFit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=976047