Bug 262656

Summary: cantor crashes when plotting data from a file using octave backend
Product: [Applications] cantor Reporter: Luis Silva <lacsilva>
Component: generalAssignee: Alexander Rieder <alexanderrieder>
Status: RESOLVED FIXED    
Severity: crash CC: micheluzzo
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Luis Silva 2011-01-09 14:08:58 UTC
Application: cantor (0.2)
KDE Platform Version: 4.5.95 (4.6 RC2)
Qt Version: 4.7.1
Operating System: Linux 2.6.37-12-generic x86_64
Distribution: Ubuntu natty (development branch)

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

table=load('table.dat');
direction=table(:,3)-90;
strength=table(:,4);
plot(direction,strength);

where 'table.dat' is a data file looking like this:
 -180.00   84.00   -23.89080     0.28900
 -174.00   84.00   -18.12580     0.27240
 -168.00   84.00   -12.51935     0.25480
 -162.00   84.00    -7.05619     0.23640
 -156.00   84.00    -1.71804     0.21770
 -150.00   84.00     3.51579     0.19880
 -144.00   84.00     8.66786     0.18000
 -138.00   84.00    13.76217     0.16140
 -132.00   84.00    18.82389     0.14340
 -126.00   84.00    23.87943     0.12610

Running the script makes cantor crash every time.
The same happens if instead of 'plot' I use 'polar'

The crash can be reproduced every time.

-- Backtrace:
Application: Cantor (cantor), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fa7b67c7780 (LWP 3299))]

Thread 4 (Thread 0x7fa7ace7b700 (LWP 3302)):
#0  next_valid_source (context=0x257cb90, priority=0x7fa7ace7acbc) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:2494
#1  g_main_context_prepare (context=0x257cb90, priority=0x7fa7ace7acbc) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:2794
#2  0x0000003a4aa430e4 in g_main_context_iterate (context=0x257cb90, block=1, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3071
#3  0x0000003a4aa43789 in g_main_context_iteration (context=0x257cb90, may_block=1) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3154
#4  0x0000003a4b784a26 in QEventDispatcherGlib::processEvents (this=0x25037a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x0000003a4b758ed2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x0000003a4b75910c in QEventLoop::exec (this=0x7fa7ace7add0, flags=...) at kernel/qeventloop.cpp:201
#7  0x0000003a4b670214 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x0000003a4b73b3df in QInotifyFileSystemWatcherEngine::run (this=0x244e170) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x0000003a4b6729ce in QThreadPrivate::start (arg=0x244e170) at thread/qthread_unix.cpp:285
#10 0x0000003ed4606d8c in start_thread (arg=0x7fa7ace7b700) at pthread_create.c:304
#11 0x0000003ed3ee061d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fa7ab359700 (LWP 3308)):
#0  0x0000003a4aa421c2 in g_main_context_prepare (context=0x2a0da00, priority=0x7fa7ab358cbc) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:2759
#1  0x0000003a4aa430e4 in g_main_context_iterate (context=0x2a0da00, block=1, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3071
#2  0x0000003a4aa43789 in g_main_context_iteration (context=0x2a0da00, may_block=1) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3154
#3  0x0000003a4b784a26 in QEventDispatcherGlib::processEvents (this=0x25a1e10, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x0000003a4b758ed2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x0000003a4b75910c in QEventLoop::exec (this=0x7fa7ab358dd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x0000003a4b670214 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x0000003a4b73b3df in QInotifyFileSystemWatcherEngine::run (this=0x29ea910) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x0000003a4b6729ce in QThreadPrivate::start (arg=0x29ea910) at thread/qthread_unix.cpp:285
#9  0x0000003ed4606d8c in start_thread (arg=0x7fa7ab359700) at pthread_create.c:304
#10 0x0000003ed3ee061d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fa7aab58700 (LWP 3309)):
#0  0x0000003ed3ed34b3 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x0000003a4aa43260 in g_main_context_poll (context=0x2a24e30, block=<value optimized out>, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3404
#2  g_main_context_iterate (context=0x2a24e30, block=<value optimized out>, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3086
#3  0x0000003a4aa43789 in g_main_context_iteration (context=0x2a24e30, may_block=1) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3154
#4  0x0000003a4b784a26 in QEventDispatcherGlib::processEvents (this=0x2a08bb0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#5  0x0000003a4b758ed2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x0000003a4b75910c in QEventLoop::exec (this=0x7fa7aab57de0, flags=...) at kernel/qeventloop.cpp:201
#7  0x0000003a4b670214 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#8  0x0000003a500af13c in Herqq::Upnp::HControlPointThread::run() () from /usr/lib/libHUpnp.so.0
#9  0x0000003a4b6729ce in QThreadPrivate::start (arg=0x2a23140) at thread/qthread_unix.cpp:285
#10 0x0000003ed4606d8c in start_thread (arg=0x7fa7aab58700) at pthread_create.c:304
#11 0x0000003ed3ee061d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa7b67c7780 (LWP 3299)):
[KCrash Handler]
#6  memcpy () at ../sysdeps/x86_64/memcpy.S:267
#7  0x0000003a4d0a962c in QX11PixmapData::fromImage (this=0x2bf08e0, img=..., flags=...) at /usr/include/bits/string3.h:52
#8  0x0000003a4d092cdf in QPixmap::fromImage (image=..., flags=...) at image/qpixmap.cpp:2033
#9  0x0000003a4cff28a6 in convert (d=0x7fff156661b0, t=QVariant::Pixmap, result=0x7fff156660e0, ok=0x0) at kernel/qguivariant.cpp:462
#10 0x0000003a4d26c105 in qvariant_cast_helper (doc=0x22b2df0, format=...) at ../../include/QtCore/../../src/corelib/kernel/qvariant.h:452
#11 qvariant_cast<QPixmap> (doc=0x22b2df0, format=...) at ../../include/QtCore/../../src/corelib/kernel/qvariant.h:584
#12 getPixmap (doc=0x22b2df0, format=...) at text/qtextimagehandler.cpp:69
#13 0x0000003a4d26c943 in getPixmapSize (this=<value optimized out>, doc=0x22b2df0, posInDocument=<value optimized out>, format=<value optimized out>) at text/qtextimagehandler.cpp:128
#14 QTextImageHandler::intrinsicSize (this=<value optimized out>, doc=0x22b2df0, posInDocument=<value optimized out>, format=<value optimized out>) at text/qtextimagehandler.cpp:217
#15 0x00007fa7afa6121b in AnimationHandler::intrinsicSize (this=0x22c66a0, doc=0x22b2df0, posInDoc=225, format=...) at ../../../cantor/src/animationhandler.cpp:43
#16 0x0000003a4d249669 in QTextDocumentLayout::resizeInlineObject (this=<value optimized out>, item=..., posInDocument=225, format=...) at text/qtextdocumentlayout.cpp:2960
#17 0x0000003a4d208dc1 in QTextEngine::shape (this=0x2bf53b0, item=0) at text/qtextengine.cpp:1372
#18 0x0000003a4d21310c in QTextLine::layout_helper (this=0x7fff15666b10, maxGlyphs=<value optimized out>) at text/qtextlayout.cpp:1836
#19 0x0000003a4d2509bb in QTextDocumentLayoutPrivate::layoutBlock (this=0x22b3a40, bl=<value optimized out>, blockPosition=<value optimized out>, blockFormat=..., layoutStruct=0x7fff15667450, layoutFrom=225, layoutTo=226, previousBlockFormat=0x0) at text/qtextdocumentlayout.cpp:2600
#20 0x0000003a4d2586d2 in QTextDocumentLayoutPrivate::layoutFlow (this=0x22b3a40, it=..., layoutStruct=0x7fff15667450, layoutFrom=225, layoutTo=226, width=<value optimized out>) at text/qtextdocumentlayout.cpp:2404
#21 0x0000003a4d253930 in QTextDocumentLayoutPrivate::layoutCell (this=0x22b3a40, t=0x227b500, cell=..., width=..., layoutFrom=225, layoutTo=226, td=0x29cf000, absoluteTableY=..., withPageBreaks=false) at text/qtextdocumentlayout.cpp:1534
#22 0x0000003a4d254705 in QTextDocumentLayoutPrivate::layoutTable (this=0x22b3a40, table=0x227b500, layoutFrom=225, layoutTo=226, parentY=...) at text/qtextdocumentlayout.cpp:1644
#23 0x0000003a4d256aa3 in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x227b500, layoutFrom=225, layoutTo=226, frameWidth=<value optimized out>, frameHeight=..., parentY=...) at text/qtextdocumentlayout.cpp:2109
#24 0x0000003a4d2576a7 in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x227b500, layoutFrom=225, layoutTo=226, parentY=...) at text/qtextdocumentlayout.cpp:2051
#25 0x0000003a4d258cf0 in QTextDocumentLayoutPrivate::layoutFlow (this=0x22b3a40, it=..., layoutStruct=0x7fff15668350, layoutFrom=225, layoutTo=226, width=<value optimized out>) at text/qtextdocumentlayout.cpp:2313
#26 0x0000003a4d256ebb in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x20cd530, layoutFrom=225, layoutTo=226, frameWidth=<value optimized out>, frameHeight=..., parentY=...) at text/qtextdocumentlayout.cpp:2145
#27 0x0000003a4d2576a7 in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x20cd530, layoutFrom=225, layoutTo=226, parentY=...) at text/qtextdocumentlayout.cpp:2051
#28 0x0000003a4d258cf0 in QTextDocumentLayoutPrivate::layoutFlow (this=0x22b3a40, it=..., layoutStruct=0x7fff15668a90, layoutFrom=225, layoutTo=226, width=<value optimized out>) at text/qtextdocumentlayout.cpp:2313
#29 0x0000003a4d256ebb in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x22b4230, layoutFrom=225, layoutTo=226, frameWidth=<value optimized out>, frameHeight=..., parentY=...) at text/qtextdocumentlayout.cpp:2145
#30 0x0000003a4d2576a7 in QTextDocumentLayoutPrivate::layoutFrame (this=0x22b3a40, f=0x22b4230, layoutFrom=225, layoutTo=226, parentY=...) at text/qtextdocumentlayout.cpp:2051
#31 0x0000003a4d25a58a in QTextDocumentLayout::doLayout (this=0x22b3a20, from=225, oldLength=<value optimized out>, length=1) at text/qtextdocumentlayout.cpp:2914
#32 0x0000003a4d25bd15 in QTextDocumentLayout::documentChanged (this=0x22b3a20, from=225, oldLength=0, length=1) at text/qtextdocumentlayout.cpp:2877
#33 0x0000003a4d235df6 in QTextDocumentPrivate::finishEdit (this=0x22b2e10) at text/qtextdocument_p.cpp:1216
#34 0x0000003a4d238a60 in QTextDocumentPrivate::insert (this=0x22b2e10, pos=225, strPos=274, strLength=1, format=35) at text/qtextdocument_p.cpp:472
#35 0x0000003a4d262cba in QTextCursor::insertText (this=0x7fff15669220, text=..., _format=<value optimized out>) at text/qtextcursor.cpp:1450
#36 0x00007fa7afa5fd3d in ResultProxy::insertResult (this=0x22c66d0, cursor=..., result=0x2277760) at ../../../cantor/src/resultproxy.cpp:100
#37 0x00007fa7afa5c8c5 in CommandEntry::update (this=0x227aeb0) at ../../../cantor/src/commandentry.cpp:443
#38 0x00007fa7afa4b899 in CommandEntry::qt_metacall (this=0x227aeb0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff156692e0) at moc_commandentry.cpp:87
#39 0x0000003a4b76ebb8 in QMetaObject::activate (sender=0x2cce800, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3280
#40 0x0000003a5161a2ed in Cantor::Expression::setResult (this=0x2cce800, result=<value optimized out>) at ../../../../cantor/src/lib/expression.cpp:130
#41 0x00007fa7b12058fe in OctaveExpression::parsePlotFile (this=0x2cce800, file=<value optimized out>) at ../../../../../cantor/src/backends/octave/octaveexpression.cpp:136
#42 0x00007fa7b12043e2 in OctaveSession::plotFileChanged (this=0x22c34e0, filename=...) at ../../../../../cantor/src/backends/octave/octavesession.cpp:260
#43 0x00007fa7b1202454 in OctaveSession::qt_metacall (this=0x22c34e0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff15669520) at moc_octavesession.cpp:94
#44 0x0000003a4b76ebb8 in QMetaObject::activate (sender=0x2147650, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff15669520) at kernel/qobject.cpp:3280
#45 0x0000003a4c9166b5 in KDirWatch::created (this=<value optimized out>, _t1=<value optimized out>) at ./kdirwatch.moc:106
#46 0x0000003a4c9166f6 in KDirWatch::setCreated (this=0x2147650, _file=...) at ../../kdecore/io/kdirwatch.cpp:1857
#47 0x0000003a4c916931 in KDirWatch::qt_metacall (this=0x2147650, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x21651b0) at ./kdirwatch.moc:85
#48 0x0000003a4b76da4a in QObject::event (this=0x2147650, e=<value optimized out>) at kernel/qobject.cpp:1219
#49 0x0000003a4cfbab24 in QApplicationPrivate::notify_helper (this=0x1d30790, receiver=0x2147650, e=0x2475de0) at kernel/qapplication.cpp:4445
#50 0x0000003a4cfbf45a in QApplication::notify (this=<value optimized out>, receiver=0x2147650, e=0x2475de0) at kernel/qapplication.cpp:4324
#51 0x0000003a4ea3b6d6 in KApplication::notify (this=0x7fff15669f70, receiver=0x2147650, event=0x2475de0) at ../../kdeui/kernel/kapplication.cpp:311
#52 0x0000003a4b759aec in QCoreApplication::notifyInternal (this=0x7fff15669f70, receiver=0x2147650, event=0x2475de0) at kernel/qcoreapplication.cpp:732
#53 0x0000003a4b75d275 in sendEvent (receiver=0x0, event_type=0, data=0x1d16550) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#54 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1d16550) at kernel/qcoreapplication.cpp:1373
#55 0x0000003a4b784833 in sendPostedEvents (s=0x1d335d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#56 postEventSourceDispatch (s=0x1d335d0) at kernel/qeventdispatcher_glib.cpp:277
#57 0x0000003a4aa42d0d in g_main_dispatch (context=0x1d334e0) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:2440
#58 g_main_context_dispatch (context=0x1d334e0) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3013
#59 0x0000003a4aa434f8 in g_main_context_iterate (context=0x1d334e0, block=<value optimized out>, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3091
#60 0x0000003a4aa43789 in g_main_context_iteration (context=0x1d334e0, may_block=1) at /build/buildd/glib2.0-2.27.90/glib/gmain.c:3154
#61 0x0000003a4b7849cf in QEventDispatcherGlib::processEvents (this=0x1d15c00, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#62 0x0000003a4d060a9e in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#63 0x0000003a4b758ed2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#64 0x0000003a4b75910c in QEventLoop::exec (this=0x7fff15669f00, flags=...) at kernel/qeventloop.cpp:201
#65 0x0000003a4b75d51b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#66 0x000000000040a1ff in main (argc=5, argv=<value optimized out>) at ../../../cantor/src/main.cpp:87

Reported using DrKonqi
Comment 1 Christoph Feck 2011-09-08 19:28:09 UTC
*** Bug 281622 has been marked as a duplicate of this bug. ***
Comment 2 Luis Silva 2011-09-26 17:11:02 UTC
Still here at 4.7.1
Comment 3 Luis Silva 2012-06-11 19:50:22 UTC
Seems to not be the case anymore.