https://bugs.kde.org/show_bug.cgi?id=487748
Bug ID: 487748 Summary: LabPlot crashes when importing data to a spreadsheet with an XY-Curve related to it and the column names get changed Classification: Applications Product: LabPlot2 Version: 2.10.0 Platform: Arch Linux OS: Linux Status: REPORTED Severity: crash Priority: NOR Component: general Assignee: alexander.se...@web.de Reporter: 1293660...@qq.com Target Milestone: --- SUMMARY When attempting to import data to a spreadsheet which has an XY-Curve related to it, and the column names get changed due to the selection of "Replace" for "Position" when importing, LabPlot will crash when the mouse cursor is moved to the Plot Area. Sorry for the complicated summary; see "STEPS TO REPRODUCE" below for a concrete example. You'll need a basic CSV file such as: # test.csv a,b 1,1 2,2 3,3 STEPS TO REPRODUCE 1. Prepare a "test.csv" file as described above 2. Open LabPlot and add a new spreadsheet 3. Right-click on the spreadsheet in the Project Explorer, "Import Data → From File...", select the prepared file, ensure that "Position" is set to "Replace", and click "OK" 4. Right-click on the spreadsheet in the Project Explorer, "Plot Data → xy-Curve", select "New Plot Area in a new Worksheet", and click "Plot" 5. Change the column names of BOTH x-column and y-column, say from "a" to "c" and from "b" to "d" 6. Re-import the same file (Step 3), so that the column names are set back to "a" and "b" 7. Move the mouse cursor to the Plot Area OBSERVED RESULT LabPlot crashes EXPECTED RESULT LabPlot should not crash SOFTWARE/OS VERSIONS Linux: 6.9.2-arch1-1 KDE Plasma Version: 6.0.5 KDE Frameworks Version: 6.2.0/5.116.0 Qt Version: 6.7.1/5.15.13 ADDITIONAL INFORMATION Only when the column names of BOTH x-column and y-column are changed will LabPlot crash. Changing only one of them will not trigger the crash. Backtrace: #0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=11, no_tid=no_tid@entry=0) at pthread_kill.c:44 #1 0x0000763d57ea8eb3 in __pthread_kill_internal (threadid=<optimized out>, signo=11) at pthread_kill.c:78 #2 0x0000763d57e50a30 in __GI_raise (sig=11) at ../sysdeps/posix/raise.c:26 #3 0x0000763d5ae6688f in KCrash::defaultCrashHandler (sig=11) at /usr/src/debug/kcrash5/kcrash-5.116.0/src/kcrash.cpp:631 #4 0x0000763d57e50ae0 in <signal handler called> () at /usr/lib/libc.so.6 #5 0x00006323631382f1 in XYCurvePrivate::activatePlot (this=0x63236d89c3c0, mouseScenePos=..., maxDist=10) at /usr/src/debug/labplot/labplot-2.10.1/src/backend/worksheet/plots/cartesian/XYCurve.cpp:2505 #6 0x00006323630e804d in CartesianPlotPrivate::hoverMoveEvent (this=0x763d480181a0, event=0x7fff3c5ed3d0) at /usr/src/debug/labplot/labplot-2.10.1/src/backend/worksheet/plots/cartesian/CartesianPlot.cpp:4301 #7 0x0000763d596750a0 in QGraphicsItem::sceneEvent (this=0x763d480181a0, event=0x7fff3c5ed3d0) at graphicsview/qgraphicsitem.cpp:6917 #8 0x0000763d59690e3d in QGraphicsScenePrivate::sendHoverEvent (this=0x63236cfee3e0, type=<optimized out>, item=0x763d480181a0, hoverEvent=0x7fff3c5ed550) at graphicsview/qgraphicsscene.cpp:1306 #9 0x0000763d596af87e in QGraphicsScenePrivate::dispatchHoverEvent (this=<optimized out>, hoverEvent=0x7fff3c5ed550) at graphicsview/qgraphicsscene.cpp:3939 #10 0x0000763d5969a3ef in QGraphicsScenePrivate::dispatchHoverEvent (this=0x63236cfee3e0, hoverEvent=0x7fff3c5ed550) at graphicsview/qgraphicsscene.cpp:3875 #11 QGraphicsScene::mouseMoveEvent (this=<optimized out>, mouseEvent=0x7fff3c5ed7c0) at graphicsview/qgraphicsscene.cpp:4092 #12 0x0000763d596986fb in QGraphicsScene::event (this=0x63236d888910, event=0x7fff3c5ed7c0) at graphicsview/qgraphicsscene.cpp:3429 #13 0x0000763d59356331 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x63236d888910, e=0x7fff3c5ed7c0) at kernel/qapplication.cpp:3640 #14 0x0000763d586ab968 in QCoreApplication::notifyInternal2 (receiver=0x63236d888910, event=0x7fff3c5ed7c0) at kernel/qcoreapplication.cpp:1064 #15 0x0000763d586ab9f3 in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474 #16 0x0000763d596bc8ba in qt_sendSpontaneousEvent (receiver=<optimized out>, event=0x7fff3c5ed7c0) at kernel/qapplication.cpp:4064 #17 QGraphicsViewPrivate::mouseMoveEventHandler (this=0x63236de80210, event=0x7fff3c5edda0) at graphicsview/qgraphicsview.cpp:672 #18 0x0000763d5938f6d7 in QWidget::event (this=0x63236de7fd70, event=0x7fff3c5edda0) at kernel/qwidget.cpp:8663 #19 0x0000763d5943af88 in QFrame::event (this=0x63236de7fd70, e=0x7fff3c5edda0) at widgets/qframe.cpp:550 #20 0x0000763d586aae02 in QCoreApplicationPrivate::sendThroughObjectEventFilters (receiver=receiver@entry=0x63236de814e0, event=event@entry=0x7fff3c5edda0) at kernel/qcoreapplication.cpp:1190 #21 0x0000763d59356321 in QApplicationPrivate::notify_helper (this=this@entry=0x63236cbd0ef0, receiver=receiver@entry=0x63236de814e0, e=e@entry=0x7fff3c5edda0) at kernel/qapplication.cpp:3634 #22 0x0000763d5935c0d1 in QApplication::notify (this=<optimized out>, receiver=0x63236de814e0, e=0x7fff3c5edda0) at kernel/qapplication.cpp:3084 #23 0x0000763d586ab968 in QCoreApplication::notifyInternal2 (receiver=0x63236de814e0, event=0x7fff3c5edda0) at kernel/qcoreapplication.cpp:1064 #24 0x0000763d586ab9f3 in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474 #25 0x0000763d59359df5 in QApplicationPrivate::sendMouseEvent (receiver=0x63236de814e0, event=0x7fff3c5edda0, alienWidget=<optimized out>, nativeWidget=0x63236cdd3b00, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2622 #26 0x0000763d593a8c8a in QWidgetWindow::handleMouseEvent (this=this@entry=0x63236d0283f0, event=event@entry=0x7fff3c5ee120) at kernel/qwidgetwindow.cpp:684 #27 0x0000763d593aacc7 in QWidgetWindow::event (this=0x63236d0283f0, event=0x7fff3c5ee120) at kernel/qwidgetwindow.cpp:300 #28 0x0000763d59356331 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x63236d0283f0, e=0x7fff3c5ee120) at kernel/qapplication.cpp:3640 #29 0x0000763d586ab968 in QCoreApplication::notifyInternal2 (receiver=0x63236d0283f0, event=0x7fff3c5ee120) at kernel/qcoreapplication.cpp:1064 #30 0x0000763d586ab9f3 in QCoreApplication::sendSpontaneousEvent (receiver=<optimized out>, event=<optimized out>) at kernel/qcoreapplication.cpp:1474 #31 0x0000763d58b3ba60 in QGuiApplicationPrivate::processMouseEvent (e=0x763d44003af0) at kernel/qguiapplication.cpp:2285 #32 0x0000763d58b1cddd in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169 #33 0x0000763d540d5cf5 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /usr/lib/libQt5WaylandClient.so.5 #34 0x0000763d55f14a89 in g_main_dispatch (context=0x763d48000ed0) at ../glib/glib/gmain.c:3344 #35 0x0000763d55f769b7 in g_main_context_dispatch_unlocked (context=0x763d48000ed0) at ../glib/glib/gmain.c:4152 #36 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x763d48000ed0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4217 #37 0x0000763d55f13f95 in g_main_context_iteration (context=0x763d48000ed0, may_block=1) at ../glib/glib/gmain.c:4282 #38 0x0000763d586fa27f in QEventDispatcherGlib::processEvents (this=0x63236cc17af0, flags=...) at kernel/qeventdispatcher_glib.cpp:423 #39 0x0000763d586a372c in QEventLoop::exec (this=0x7fff3c5ee4d0, flags=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69 #40 0x0000763d586afafd in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121 #41 0x0000763d58b2f15f in QGuiApplication::exec () at kernel/qguiapplication.cpp:1870 #42 0x0000763d5935480a in QApplication::exec () at kernel/qapplication.cpp:2832 #43 0x0000632362ef4f24 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/labplot/labplot-2.10.1/src/kdefrontend/LabPlot.cpp:236 -- You are receiving this mail because: You are watching all bug changes.