Bug 511437

Summary: Labplot crashes instantly with a Segmentation fault when attempting to change a plot's axis scale from "Linear" to "Log10" or any other value. The crash occurs immediately upon clicking the new scale type in the dropdown menu.
Product: [Applications] LabPlot2 Reporter: kunjal.sng <kuhisingh>
Component: backendAssignee: Alexander Semke <alexander.semke>
Status: REPORTED ---    
Severity: crash CC: martin.marmsoler, tarcisi
Priority: NOR    
Version First Reported In: 2.12.1   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Recording

Description kunjal.sng@gmail.com 2025-10-31 17:31:26 UTC
Labplot crashes instantly with a `Segmentation fault` when attempting to change a plot's axis scale from "Linear" to "Log10" or any other value. The crash occurs immediately upon clicking the new scale type in the dropdown menu.

1. Application and System Details

  * Application: Labplot
  * Version: 2.12.0 (from crash log)
  * Operating System: macOS 14.2.1 (23C71)
  * Architecture: ARM-64 (Apple Silicon)

-----

2. Steps to Reproduce

1.  Launch Labplot on macOS.
2.  Create a new spreadsheet.
3.  Copy a column of X-values from an external source (e.g., Excel) and paste them into a spreadsheet column.
4.  Copy a column of Y-values and paste them into another spreadsheet column.
5.  Create a plot from these two columns.
6.  Go to the plot's properties/settings area.
7.  Locate the X-axis or Y-axis scale settings.
8.  Untick the "Auto" setting for the scale.
9.  Click the dropdown menu that currently shows "Linear".
10. Click on any other scale option (e.g., "Log10").

-----

 3. Expected Behavior

The plot's axis scale should change to the newly selected option (e.g., Log10), and the plot should update.

-----

 4. Actual Behavior

The Labplot application crashes instantly and closes. This behavior is 100% reproducible.

-----

 5. Crash Details and Backtrace

The crash is an `EXC_BAD_ACCESS (SIGSEGV)` due to a `KERN_INVALID_ADDRESS at 0x0000000000000008`. This suggests the code is trying to access data from a null pointer (specifically, at an offset of 8 bytes from address 0).

The crash happens in the main thread while processing events related to the `QComboBox` (the dropdown menu).

Backtrace (Thread 0 Crashed)

```
Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   QtWidgets                       0x104102f40 0x103e74000 + 2682688
1   libqcocoa.dylib                 0x100cfdffc 0x100c7c000 + 532476
2   AppKit                          0x1855454f8 __NSAccessibilityEntryPointIsAccessibilityElement_block_invoke + 424
3   AppKit                          0x18554530c NSAccessibilityPerformEntryPointBOOL + 44
4   AppKit                          0x184f5b63c NSAccessibilityEntryPointIsAccessibilityElement + 140
5   AppKit                          0x18504c9dc NSAccessibilityUnignoredAncestor + 24
6   AppKit                          0x1859950b0 -[NSWindow(NSWindowAccessibility) accessibilityFocusedUIElement] + 88
7   AppKit                          0x184fb0770 NSAccessibilityHandleFocusChangedForce + 136
8   AppKit                          0x184fcfcc8 -[NSWindow _realMakeFirstResponder:] + 724
9   libqcocoa.dylib                 0x100cbc370 0x100c7c000 + 263024
10  libqcocoa.dylib                 0x100cbc5f4 0x100c7c000 + 263668
11  QtGui                           0x104bcfe08 QWindowPrivate::destroy() + 196
12  QtWidgets                       0x103eeb860 0x103e74000 + 489568
13  QtWidgets                       0x103eeb980 0x103e74000 + 489856
14  QtWidgets                       0x103ec3a1c QWidget::destroy(bool, bool) + 664
15  QtWidgets                       0x103ec307c QWidget::~QWidget() + 1172
16  QtWidgets                       0x103fa59ac QComboBoxPrivateContainer::~QComboBoxPrivateContainer() + 140
17  QtWidgets                       0x103fa8ddc QComboBox::~QComboBox() + 140
18  labplot                         0x10017ebc4 0x100004000 + 1551300
19  QtCore                          0x10454b190 QObject::event(QEvent*) + 696
20  QtWidgets                       0x103ed5d3c QWidget::event(QEvent*) + 3236
21  QtWidgets                       0x103fad35c QComboBox::event(QEvent*) + 352
22  QtWidgets                       0x103e8389c QApplicationPrivate::notify_helper(QObject*, QEvent*) + 336
23  QtWidgets                       0x103e8531c QApplication::notify(QObject*, QEvent*) + 3260
24  QtCore                          0x104503ff8 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 200
25  QtCore                          0x104505104 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 532
26  libqcocoa.dylib                 0x100c94fa4 0x100c7c000 + 102308
27  libqcocoa.dylib                 0x100c961f0 0x100c7c000 + 106992
28  CoreFoundation                  0x181703a4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
29  CoreFoundation                  0x1817039e0 __CFRunLoopDoSource0 + 176
30  CoreFoundation                  0x181703750 __CFRunLoopDoSources0 + 244
31  CoreFoundation                  0x181702340 __CFRunLoopRun + 828
32  CoreFoundation                  0x1817019ac CFRunLoopRunSpecific + 608
33  HIToolbox                       0x18bcb0448 RunCurrentEventLoopInMode + 292
34  HIToolbox                       0x18bcb00d8 ReceiveNextEventCommon + 220
35  HIToolbox                       0x18bcaffdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
36  AppKit                          0x184ede8a4 _DPSNextEvent + 660
37  AppKit                          0x1856b8980 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
38  AppKit                          0x184ed1d50 -[NSApplication run] + 476
39  libqcocoa.dylib                 0x100c93adc 0x100c7c000 + 96988
40  QtCore                          0x10450dfe0 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 596
41  QtCore                          0x1045047d4 QCoreApplication::exec() + 144
42  labplot                         0x10001bbb4 0x100004000 + 97204
43  dyld                            0x1812a50e0 start + 2360
Comment 1 Martin 2025-11-17 17:13:11 UTC
Hi,
I tried to reproduce, but I generated some data in the spreadsheet using "Generate Rownumbers". Does it crash there also for you? Otherwise can you provide you data to validate with them?
Comment 2 Martin 2025-11-17 17:16:22 UTC
Can you retry with 2.12.1?
Comment 3 kunjal.sng@gmail.com 2025-11-18 12:36:25 UTC
(In reply to Martin from comment #1)
> Hi,
> I tried to reproduce, but I generated some data in the spreadsheet using
> "Generate Rownumbers". Does it crash there also for you? Otherwise can you
> provide you data to validate with them?

Hey, I generated row numbers for x and y as well, and tried to change the scale to log10, it still crashed
Comment 4 kunjal.sng@gmail.com 2025-11-18 12:38:29 UTC
(In reply to Martin from comment #2)
> Can you retry with 2.12.1?

I am experiencing this issue on 2.12.1 itself
Comment 5 Martin 2025-11-18 15:03:45 UTC
Thanks for the feedback.

So in the x, y columns you have 1, 2, 3, .. 99, 100 ?
Comment 6 Martin 2025-11-18 15:17:28 UTC
Can you send me an example project?
Comment 7 tarcisi 2025-12-11 15:15:15 UTC
Hi Martin,
Thank you for you efforts. I'm experiencing exactly the same bug. It does also occur for me when generating 1,2,3,...,100 for X and Y as you said. I would love to provide you with an example project, but when I generate the data and the plot and want to save it it is gone once I open the project again (empty columns, no plot). I don't know if this is me not knowing LabPlot enough or whether this is a seperate bug.
Anything I can do to help?
Comment 8 Martin 2025-12-11 15:49:59 UTC
Thanks for the clarification. Can you create a small screencast from opening labplot until the crash?
Comment 9 tarcisi 2025-12-11 16:48:07 UTC
Created attachment 187526 [details]
Recording
Comment 10 Martin 2025-12-12 12:23:31 UTC
Thank you. This is really weird. Nobody of the developers is able to reproduce.
Have you tried the development versions? Have you seen this problem on other systems as well?
https://labplot.org/download/
Comment 11 tarcisi 2025-12-12 14:53:36 UTC
(In reply to Martin from comment #10)
> Thank you. This is really weird. Nobody of the developers is able to
> reproduce.
> Have you tried the development versions? Have you seen this problem on other
> systems as well?
> https://labplot.org/download/

I just tried, the bug does not occur using the version 2.12.80 I found at https://cdn.kde.org/ci-builds/education/labplot/master/macos-arm64/ .