Bug 504794 - Segfault using pin and matrix
Summary: Segfault using pin and matrix
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (other bugs)
Version First Reported In: latest
Platform: Other Other
: NOR crash
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-26 03:28 UTC by Dillon
Modified: 2025-05-31 18:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed 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 03:28:53 UTC
SUMMARY

Specific sequence of UI inputs leads to a segfault.

I'm not sure if this is the same as/related to https://bugs.kde.org/show_bug.cgi?id=502043, but it had a unique backtrace and logic so I thought it was worth reporting. 

STEPS TO REPRODUCE
1. Pin tab
2. Matrix
3. Click column one header
4. Click cell 2, 2

VIDEO
https://youtu.be/hBnc1m1gWcE

OBSERVED RESULT

LabPlot crashes with a segfault

BACKTRACE

Thread 1 "labplot" received signal SIGSEGV, Segmentation fault.
0x00007ffff55cec22 in QObject::objectName() const ()
   from /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
(gdb) bt
#0  0x00007ffff55cec22 in QObject::objectName() const ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#1  0x0000555555767e7a in MainWin::activateSubWindowForAspect
	(this=this@entry=0x555558365040, aspect=aspect@entry=0x555559035850)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/MainWin.cpp:2188
#2  0x000055555576781e in MainWin::handleCurrentAspectChanged
	(this=0x555558365040, aspect=0x555559035850)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/MainWin.cpp:2162
#3  0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#4  0x0000555555ae7a53 in ProjectExplorer::currentAspectChanged
	(this=0x7fffffffbc48, _t1=0x555559035850)
	at labplotlib_autogen/W4B5VDZ4WS/moc_ProjectExplorer.cpp:307
#5  0x00005555557a6174 in ProjectExplorer::selectionChanged
	(this=0x555559d13640, selected=<optimized out>, deselected=<optimized out>) at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/ProjectExplorer.cpp:844
#6  0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#7  0x00007ffff57f6b74 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) ()
--Type <RET> for more, q to quit, c to continue without paging--c
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#8  0x00007ffff57fd30d in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#9  0x00007ffff57ffb70 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#10 0x00007ffff57fdfc2 in QItemSelectionModel::select(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#11 0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#12 0x00005555566154ce in AspectTreeModel::indexDeselected
	(this=0x7fffffffbc48, _t1=<optimized out>)
	at labplotbackendlib_autogen/RMX4C6EZO6/moc_AspectTreeModel.cpp:306
#13 0x00005555568b90c3 in AspectTreeModel::aspectDeselectedInView
	(this=0x555559d280e0, aspect=<optimized out>)
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/include/QtCore/qcomparehelpers.h:773
#14 0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#15 0x000055555660e7c6 in AbstractAspect::childAspectDeselectedInView
	(this=0x7fffffffbc48, _t1=0x5555591b7270)
	at labplotbackendlib_autogen/RMX4C6EZO6/moc_AbstractAspect.cpp:650
#16 0x0000555555968456 in SpreadsheetView::selectionChanged
	(this=0x555558545390)
	at /home/guifuzz/GUIFuzzBenchmarks/fuzzing/labplot/labplot/src/frontend/spreadsheet/SpreadsheetView.cpp:3761
#17 0x00007ffff55de038 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#18 0x00007ffff57f6b74 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#19 0x00007ffff57fd30d in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#20 0x00007ffff57ffb70 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#21 0x00007ffff6cdae3b in QTableView::setSelection(QRect const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#22 0x00007ffff6c7623a in QAbstractItemView::mousePressEvent(QMouseEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#23 0x00007ffff69efdce in QWidget::event(QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#24 0x00007ffff6a82426 in QFrame::event(QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#25 0x00007ffff557b9c6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#26 0x00007ffff69903e5 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#27 0x00007ffff6999028 in QApplication::notify(QObject*, QEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#28 0x00007ffff557bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
	() at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#29 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
#30 0x00007ffff6a037b7 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#31 0x00007ffff6a06473 in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#32 0x00007ffff69903f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#33 0x00007ffff557bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
	() at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#34 0x00007ffff5de58b8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#35 0x00007ffff5e48aac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#36 0x00007fffee39fb9e in ??? ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6XcbQpa.so.6
#37 0x00007ffff2510397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007ffff2570dc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007ffff250f8b3 in g_main_context_iteration ()
	at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007ffff585591e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#41 0x00007ffff5588fe2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#42 0x00007ffff5585166 in QCoreApplication::exec() ()
	at /home/guifuzz/GUIFuzzBenchmarks/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#43 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-05-27 13:21:30 UTC
Hello Dillon,

Thank you for your bug report.
It is a duplicate of https://bugs.kde.org/show_bug.cgi?id=502043 and is being resolved with the upstream and internally:
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/737
https://invent.kde.org/education/labplot/-/merge_requests/717

*** This bug has been marked as a duplicate of bug 502043 ***
Comment 2 Israel Galadima 2025-05-31 18:27:47 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.