Bug 504839 - Invalid insert column left crashes lab plot with index out of range
Summary: Invalid insert column left crashes lab plot with index out of range
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: latest
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 20:21 UTC by Dillon
Modified: 2025-06-02 19:15 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dillon 2025-05-26 20:21:53 UTC
SUMMARY

LabPlot crashes when attempting to do an invalid insert column left


STEPS TO REPRODUCE
1. Open lab plot
2. Click in the spreadsheet tab, not in a cell
3. Click add column left

OBSERVED RESULT
LabPlot crashes

VIDEO
https://youtu.be/zdGTBlTLe9k


SOFTWARE/OS VERSIONS
Tested on 2.11.80 built from source and on the current available snap 

BACKTRACE
Thread 1 "labplot" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0)
	at ./nptl/pthread_kill.c:44
warning: 44	./nptl/pthread_kill.c: No such file or directory
(gdb) bt
#0  __pthread_kill_implementation
	(threadid=<optimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (threadid=<optimized out>, signo=6)
	at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
	at ./nptl/pthread_kill.c:89
#3  0x00007ffff444519e in __GI_raise (sig=sig@entry=6)
	at ../sysdeps/posix/raise.c:26
#4  0x00007ffff4428902 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007ffff54bd012 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#6  0x00007ffff54faa45 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#7  0x00007ffff54be945 in QMessageLogger::fatal(char const*, ...) const ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#8  0x00007ffff54bd0d3 in qt_assert_x(char const*, char const*, char const*, int) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#9  0x0000555555966e6b in QList<Column*>::at (this=0x7fffffffc7d8, i=-1)
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/include/QtCore/qlist.h:450
#10 SpreadsheetView::handleAspectsAdded
	(this=0x55555862c730, first=<optimized out>, last=-1)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/spr--Type <RET> for more, q to quit, c to continue without paging--c
eadsheet/SpreadsheetView.cpp:1081
#11 0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#12 0x0000555556643170 in Spreadsheet::aspectsInserted
	(this=0xe8c5f, _t1=-1, _t2=-1)
	at labplotbackendlib_autogen/CEGXCCUPMU/moc_Spreadsheet.cpp:662
#13 0x0000555556d44f12 in Spreadsheet::insertColumns
	(this=0x555559d16e10, before=-1, count=1)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/backend/spreadsheet/Spreadsheet.cpp:625
#14 0x00005555559b622e in SpreadsheetView::insertColumnsLeft
	(this=0x55555862c730, count=1)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/spreadsheet/SpreadsheetView.cpp:2657
#15 SpreadsheetView::insertColumnLeft (this=0x55555862c730)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/spreadsheet/SpreadsheetView.cpp:2630
#16 0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#17 0x00007ffff6221066 in QAction::triggered(bool) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#18 0x00007ffff622402d in QAction::activate(QAction::ActionEvent) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#19 0x00007ffff6abb7d2 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#20 0x00007ffff6abb942 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#21 0x00007ffff6be080b in QToolButton::mouseReleaseEvent(QMouseEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#22 0x00007ffff69efdce in QWidget::event(QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#23 0x00007ffff69903f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#24 0x00007ffff6999028 in QApplication::notify(QObject*, QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#25 0x00007ffff557bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
	() at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#26 0x00007ffff699836d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#27 0x00007ffff6a037b7 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#28 0x00007ffff6a06473 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#29 0x00007ffff69903f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#30 0x00007ffff557bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
	() at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#31 0x00007ffff5de58b8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#32 0x00007ffff5e48aac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#33 0x00007fffee39fb9e in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6XcbQpa.so.6
#34 0x00007ffff2510397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#35 0x00007ffff2570dc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007ffff250f8b3 in g_main_context_iteration ()
	at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007ffff585591e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#38 0x00007ffff5588fe2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#39 0x00007ffff5585166 in QCoreApplication::exec() ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#40 0x00005555556b6efd in main (argc=1, argv=<optimized out>)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/LabPlot.cpp:237
Comment 1 Israel Galadima 2025-06-02 19:15:23 UTC
Hello Dillon,

Thank you for reporting this issue. The issue has now been fixed and will be available in the next patch release for 2.12

Kind regards.