Bug 325627

Summary: kmplot crashes after deleting a function the mouse pointer follows in the plot
Product: [Applications] kmplot Reporter: Nico Kruber <nico.kruber>
Component: generalAssignee: Klaus-Dieter M <kd.moeller>
Status: RESOLVED FIXED    
Severity: crash CC: chantal_la_roche
Priority: NOR Keywords: drkonqi
Version: 1.2.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nico Kruber 2013-10-04 14:56:14 UTC
Application: kmplot (1.2.1)
KDE Platform Version: 4.11.2
Qt Version: 4.8.5
Operating System: Linux 3.11.1-29.g2fa222d-desktop x86_64
Distribution: "openSUSE 12.3 (x86_64)"

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

1) create a (cartesian) plot, e.g. f(x) = sin(x)
2) let the mouse pointer follow the values in the plot (by clicking into it near the plotted graph)
3) delete the function
-> kmplot crashes

The crash can be reproduced every time.

-- Backtrace:
Application: KmPlot (kmplot), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[KCrash Handler]
#6  size (this=this@entry=0x10) at /usr/include/QtCore/qvector.h:137
#7  DifferentialStates::resetToInitial (this=this@entry=0x10) at /usr/src/debug/kmplot-4.11.2/kmplot/function.cpp:271
#8  0x00007f74b384c7dd in Equation::setPMSignature (this=0x0, pmSignature=...) at /usr/src/debug/kmplot-4.11.2/kmplot/function.cpp:545
#9  0x00007f74b384c885 in Plot::updateFunction (this=0x1822b68) at /usr/src/debug/kmplot-4.11.2/kmplot/function.cpp:1034
#10 0x00007f74b385a1f1 in View::updateCrosshairPosition (this=this@entry=0x1822b10) at /usr/src/debug/kmplot-4.11.2/kmplot/view.cpp:3397
#11 0x00007f74b3861425 in View::paintEvent (this=0x1822b10) at /usr/src/debug/kmplot-4.11.2/kmplot/view.cpp:2603
#12 0x00007f74c20183ae in QWidget::event (this=0x1822b10, event=0x7fff910cec90) at kernel/qwidget.cpp:8533
#13 0x00007f74c1fc892c in QApplicationPrivate::notify_helper (this=this@entry=0x13b8860, receiver=receiver@entry=0x1822b10, e=e@entry=0x7fff910cec90) at kernel/qapplication.cpp:4562
#14 0x00007f74c1fccdab in QApplication::notify (this=0x7fff910cff80, receiver=0x1822b10, e=0x7fff910cec90) at kernel/qapplication.cpp:4423
#15 0x00007f74c2cdb016 in KApplication::notify (this=0x7fff910cff80, receiver=0x1822b10, event=0x7fff910cec90) at /usr/src/debug/kdelibs-4.11.2/kdeui/kernel/kapplication.cpp:311
#16 0x00007f74c15bef3e in QCoreApplication::notifyInternal (this=0x7fff910cff80, receiver=0x1822b10, event=0x7fff910cec90) at kernel/qcoreapplication.cpp:949
#17 0x00007f74c2013f74 in sendSpontaneousEvent (event=0x7fff910cec90, receiver=0x1822b10) at ../../src/corelib/kernel/qcoreapplication.h:234
#18 QWidgetPrivate::drawWidget (this=this@entry=0x1643050, pdev=pdev@entry=0x1c922b0, rgn=..., offset=..., flags=flags@entry=4, sharedPainter=sharedPainter@entry=0x0, backingStore=backingStore@entry=0x18f2920) at kernel/qwidget.cpp:5599
#19 0x00007f74c2014a6f in QWidgetPrivate::paintSiblingsRecursive (this=0x155c210, pdev=0x1c922b0, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x18f2920) at kernel/qwidget.cpp:5808
#20 0x00007f74c2013b05 in QWidgetPrivate::drawWidget (this=0x155c210, pdev=0x1c922b0, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x18f2920) at kernel/qwidget.cpp:5652
#21 0x00007f74c21de9e8 in QWidgetBackingStore::sync (this=0x18f2920) at painting/qbackingstore.cpp:1373
#22 0x00007f74c2008ac0 in QWidgetPrivate::syncBackingStore (this=this@entry=0x155c210) at kernel/qwidget.cpp:1894
#23 0x00007f74c2018854 in QWidget::event (this=0x15253b0, event=0x1fc4370) at kernel/qwidget.cpp:8680
#24 0x00007f74c23dd26b in QMainWindow::event (this=0x15253b0, event=0x1fc4370) at widgets/qmainwindow.cpp:1478
#25 0x00007f74c2dccee8 in KXmlGuiWindow::event (this=0x15253b0, ev=0x1fc4370) at /usr/src/debug/kdelibs-4.11.2/kdeui/xmlgui/kxmlguiwindow.cpp:126
#26 0x00007f74c1fc892c in QApplicationPrivate::notify_helper (this=this@entry=0x13b8860, receiver=receiver@entry=0x15253b0, e=e@entry=0x1fc4370) at kernel/qapplication.cpp:4562
#27 0x00007f74c1fccdab in QApplication::notify (this=0x7fff910cff80, receiver=0x15253b0, e=0x1fc4370) at kernel/qapplication.cpp:4423
#28 0x00007f74c2cdb016 in KApplication::notify (this=0x7fff910cff80, receiver=0x15253b0, event=0x1fc4370) at /usr/src/debug/kdelibs-4.11.2/kdeui/kernel/kapplication.cpp:311
#29 0x00007f74c15bef3e in QCoreApplication::notifyInternal (this=0x7fff910cff80, receiver=receiver@entry=0x15253b0, event=event@entry=0x1fc4370) at kernel/qcoreapplication.cpp:949
#30 0x00007f74c15c28a1 in sendEvent (event=0x1fc4370, receiver=0x15253b0) at kernel/qcoreapplication.h:231
#31 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x137f670) at kernel/qcoreapplication.cpp:1573
#32 0x00007f74c15ed423 in sendPostedEvents () at kernel/qcoreapplication.h:236
#33 postEventSourceDispatch (s=0x13b41d0) at kernel/qeventdispatcher_glib.cpp:280
#34 0x00007f74bd648b25 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#35 0x00007f74bd648e68 in ?? () from /usr/lib64/libglib-2.0.so.0
#36 0x00007f74bd648f24 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#37 0x00007f74c15ed5b6 in QEventDispatcherGlib::processEvents (this=0x1384ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#38 0x00007f74c2068e0e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#39 0x00007f74c15bdbef in QEventLoop::processEvents (this=this@entry=0x7fff910cfe60, flags=...) at kernel/qeventloop.cpp:149
#40 0x00007f74c15bde78 in QEventLoop::exec (this=0x7fff910cfe60, flags=...) at kernel/qeventloop.cpp:204
#41 0x00007f74c15c2bb8 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1221
#42 0x00000000004093cd in main (argc=1, argv=0x7fff910d00b8) at /usr/src/debug/kmplot-4.11.2/kmplot/main.cpp:79

The reporter indicates this bug may be a duplicate of or related to bug 261474.

Possible duplicates by query: bug 261474.

Reported using DrKonqi
Comment 1 Christoph Feck 2013-10-04 18:42:22 UTC
*** Bug 261474 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Crouthamel 2018-10-30 00:00:20 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Yuri Chornoivan 2018-11-03 11:44:11 UTC
Git commit c57ae7614b292ce42eb37cec280f7cb2714605e7 by Yuri Chornoivan.
Committed on 03/11/2018 at 11:43.
Pushed by yurchor into branch 'master'.

Disable trace mode in KmPlot before deleting tracing curve from the plot
Differential Revision: https://phabricator.kde.org/D16324

M  +11   -0    kmplot/view.cpp
M  +2    -0    kmplot/view.h

https://commits.kde.org/kmplot/c57ae7614b292ce42eb37cec280f7cb2714605e7