Bug 502043 - Reproducible Segfault: Pin Active Tab > New Spreadsheet > Select Column 2
Summary: Reproducible Segfault: Pin Active Tab > New Spreadsheet > Select Column 2
Status: CONFIRMED
Alias: None
Product: LabPlot2
Classification: Applications
Component: frontend (show other bugs)
Version: latest
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Alexander Semke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-26 20:16 UTC by Dillon
Modified: 2025-03-26 22:05 UTC (History)
0 users

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-03-26 20:16:11 UTC
SUMMARY
Deterministic sequence of UI selections leads to a segmentation fault and labplot crashing. 

STEPS TO REPRODUCE
1. Open Labplot
2. Click 'Pin active tab'
3. Click the 'Spreadsheet' menu button
4. Click column 2 in the browser

OBSERVED RESULT
Labplot crashes with a segfault

VIDEO
https://youtu.be/VX0wbvd7LYU

BACKTRACE
```
Thread 1 "labplot" received signal SIGSEGV, Segmentation fault.
0x00007ffff57cec1e in QObject::objectName() const ()
   from /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
(gdb) bt
#0  0x00007ffff57cec1e in QObject::objectName() const ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#1  0x00005555557fad11 in MainWin::activateSubWindowForAspect
    (this=this@entry=0x7fffe0003e00, aspect=aspect@entry=0x555557255c60)
    at /home/dillon/git/labplot/src/frontend/MainWin.cpp:2175
#2  0x00005555557faf5c in MainWin::activateSubWindowForAspect
    (this=this@entry=0x7fffe0003e00, aspect=aspect@entry=0x555556bfd7d0)
    at /home/dillon/git/labplot/src/frontend/MainWin.cpp:2208
#3  0x00005555557fb1a8 in MainWin::handleCurrentAspectChanged
    (this=0x7fffe0003e00, aspect=0x555556bfd7d0)
    at /home/dillon/git/labplot/src/frontend/MainWin.cpp:2149
#4  0x00007ffff57de038 in ??? ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#5  0x00005555558e8671 in ProjectExplorer::currentAspectChanged
    (this=this@entry=0x555556baa920, _t1=<optimized out>)
    at /home/dillon/git/labplot/build/src/labplotlib_autogen/W4B5VDZ4WS/moc_ProjectExplorer.cpp:307
#6  0x00005555558151e8 in ProjectExplorer::selectionChanged
    (this=0x555556baa920, selected=<optimized out>, deselected=<optimized out>)
    at /home/dillon/Qt/6.8.1/gcc_64/include/QtCore/qlist.h:115
#7  0x00007ffff57de038 in ??? ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#8  0x00007ffff59f6b74 in QItemSelectionModel::selectionChanged(QItemSelection
const&, QItemSelection const&) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#9  0x00007ffff59fd30d in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#10 0x00007ffff59ffb70 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#11 0x00007ffff6f0424a in QTreeViewPrivate::select(QModelIndex const&, QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#12 0x00007ffff6f04a66 in QTreeView::setSelection(QRect const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#13 0x00007ffff6e7623a in QAbstractItemView::mousePressEvent(QMouseEvent*) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#14 0x00007ffff6befdce in QWidget::event(QEvent*) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#15 0x00007ffff6c82426 in QFrame::event(QEvent*) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#16 0x00007ffff577b9c6 in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#17 0x00007ffff6b903e5 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#18 0x00007ffff6b99028 in QApplication::notify(QObject*, QEvent*) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#19 0x00007ffff577bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#20 0x00007ffff6b9836d in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#21 0x00007ffff6c037b7 in ??? ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#22 0x00007ffff6c06473 in ??? ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#23 0x00007ffff6b903f6 in QApplicationPrivate::notify_helper(QObject*, QEvent*)
    () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Widgets.so.6
#24 0x00007ffff577bcaa in QCoreApplication::notifyInternal2(QObject*, QEvent*)
    () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#25 0x00007ffff5fe58b8 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#26 0x00007ffff6048aac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Gui.so.6
#27 0x00007fffef5bdb9e in ??? ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6XcbQpa.so.6
#28 0x00007ffff2ebf397 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff2f1fdc7 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff2ebe8b3 in g_main_context_iteration ()
    at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff5a5591e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#32 0x00007ffff5788fe2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#33 0x00007ffff5785166 in QCoreApplication::exec() ()
    at /home/dillon/Qt/6.8.1/gcc_64/lib/libQt6Core.so.6
#34 0x00005555557b5bc5 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/dillon/git/labplot/src/frontend/LabPlot.cpp:237
```

VERSIONS
Ubuntu 24.10
Qt Version: 6.8.1