Skip to content

macOS: SIGSEGV in _gradient_events_button_pressed #20759

@hjboth

Description

@hjboth

Is there an existing issue for this?

  • I checked and did not find my issue in the already reported ones

Describe the bug

I tried to add a second (ctrl+click) gradient mask in darkroom and got an NPE here:

Exception Type:    EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Codes:   0x0000000000000001, 0x0000000000000000

Termination Reason:  Namespace SIGNAL, Code 11, Segmentation fault: 11
Terminating Process: exc handler [27410]


VM Region Info: 0 is not in any region.  Bytes before following region: 4303273984
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->
      __TEXT                      1007ec000-100800000    [   80K] r-x/r-x SM=COW  /Applications/darktable.app/Contents/MacOS/darktable

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libdarktable.dylib            	       0x1011ee800 _gradient_events_button_pressed + 88
1   libdarktable.dylib            	       0x1011f66cc dt_masks_events_button_pressed + 248
2   libdarkroom.so                	       0x120358844 button_pressed + 584
3   libdarktable.dylib            	       0x10119377c dt_control_button_pressed + 360
4   libdarktable.dylib            	       0x101255d08 _button_pressed + 108 

see attached dump for full info.

Steps to reproduce

Add a second gradient mask (with ctrl+click). Mask indicator can't be detached from mouse with single left click (only with right click which btw is inconsistent UI behaviour in my point of view). On double left click NPE occurs. Bug is reproducable, but not necessarily with other masks, tried circular mask as alternative only.

Expected behavior

No NPE of course and probably consistent left click behaviour

Logfile | Screenshot | Screencast

darktable_dump.txt

Commit

No response

Where did you obtain darktable from?

darktable.org / GitHub release

darktable version

5.4.1

What OS are you using?

Mac

What is the version of your OS?

Tahoe 26.4 (25E246)

Describe your system

Model: Mac15,6, BootROM 18000.101.7, proc 12:6:6:0 processors, 36 GB, SMC
Graphics: Apple M3 Pro, Apple M3 Pro, Built-In
Display: HP Z32k G3, 6016 x 3384, Main, MirrorOff, Online
Memory Module: LPDDR5, Micron                 
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4388), wl0: Feb  2 2026 19:18:00 version 23.50.20.0.41.51.208 FWID 01-3e23bec0
IO80211_driverkit-1555.23 "IO80211_driverkit-1555.23" Mar  5 2026 21:45:55
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: USB 10/100/1000 LAN, Ethernet, en10
Network Service: Wi-Fi, AirPort, en0
Thunderbolt Bus: MacBook Pro, Apple Inc.      
Thunderbolt Device: Z32k G3, HP, 1, 38.5
Thunderbolt Bus: MacBook Pro, Apple Inc.      
Thunderbolt Bus: MacBook Pro, Apple Inc.

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions