opened 08:23PM - 01 Oct 23 UTC
### Describe the bug
I recently switched from an Nvidia GPU to an AMD one. Now …the rgb curve module causes darktable to crash after i add a second curve control point to the curve.
The crash is reproducible on Wayland & Xorg and with and without opencl.

opencl package: opencl-amd 5.7 (rocm-5.7.0)
OS: Manjaro
dt build: 4.5.0+786~g1439bb0eb6
Image: (could not upload a example file but the issue appeared on RAF & ARW files. I think its not dependent on the file type)
darktable debug output: [darktable_debug_all.txt](https://github.com/darktable-org/darktable/files/12778159/darktable_debug_all.txt)
inxi -Gazy
```
inxi -Gazy
Graphics:
Device-1: AMD Navi 31 [Radeon RX 7900 XT/7900 XTX] vendor: Sapphire PULSE
driver: amdgpu v: kernel arch: RDNA-3 code: Navi-3x process: TSMC n5 (5nm)
built: 2022+ pcie: gen: 4 speed: 16 GT/s lanes: 16 ports: active: DP-1
empty: DP-2,HDMI-A-1,HDMI-A-2 bus-ID: 03:00.0 chip-ID: 1002:744c
class-ID: 0300
Device-2: AMD Raphael driver: amdgpu v: kernel arch: RDNA-2 code: Navi-2x
process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s lanes: 16
ports: active: none empty: DP-3, DP-4, DP-5, HDMI-A-3 bus-ID: 0f:00.0
chip-ID: 1002:164e class-ID: 0300 temp: 60.0 C
Display: wayland server: X.org v: 1.21.1.8 with: Xwayland v: 23.2.0
compositor: gnome-shell v: 44.5 driver: gpu: amdgpu display-ID: 0
Monitor-1: DP-1 model: Samsung C27HG7x serial: <filter> built: 2038
res: 2560x1440 dpi: 109 gamma: 1.2 size: 598x336mm (23.54x13.23")
diag: 686mm (27") ratio: 16:9 modes: max: 2560x1440 min: 720x400
API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
device: 1 drv: radeonsi device: 2 drv: swrast gbm: drv: kms_swrast
surfaceless: drv: radeonsi wayland: drv: radeonsi x11: drv: radeonsi
API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 23.1.7-1 glx-v: 1.4
direct-render: yes renderer: AMD Radeon RX 7900 XTX (gfx1100 LLVM 16.0.6 DRM
3.54 6.5.3-1-MANJARO) device-ID: 1002:744c memory: 23.44 GiB unified: no
display-ID: :0.0
```
**gdb darktable ( full log [dartable_gdb_output.txt](https://github.com/darktable-org/darktable/files/12778114/dartable_gdb_output.txt) ):**
```
....
[New Thread 0x7ffd9ff8f6c0 (LWP 66627)]
[New Thread 0x7ffd9ef8d6c0 (LWP 66628)]
[Thread 0x7ffd9ff8f6c0 (LWP 66627) exited]
[Thread 0x7ffd9f78e6c0 (LWP 66626) exited]
[Thread 0x7ffd9ef8d6c0 (LWP 66628) exited]
Thread 11 "worker res 0" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc77fe6c0 (LWP 66292)]
0x00007fffc471f354 in _generate_curve_lut (pipe=<optimized out>, d=d@entry=0x7ffe5113f010)
at /home/robin/git/darktable/src/iop/rgbcurve.c:1565
1565 (void)dt_draw_curve_add_point(d->curve[ch], curve_nodes[ch][k].x, curve_nodes[ch][k].y);
(gdb) s
Thread 12 "worker res 1" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc6ffd6c0 (LWP 66293)]
0x00007fffc471f354 in _generate_curve_lut (pipe=<optimized out>, d=d@entry=0x7ffe3c015010)
at /home/robin/git/darktable/src/iop/rgbcurve.c:1565
1565 (void)dt_draw_curve_add_point(d->curve[ch], curve_nodes[ch][k].x, curve_nodes[ch][k].y);
(gdb)
Couldn't get registers: Kein passender Prozess gefunden.
(gdb)
Couldn't get registers: Kein passender Prozess gefunden.
(gdb)
Couldn't get registers: Kein passender Prozess gefunden.
(gdb)
Couldn't get registers: Kein passender Prozess gefunden.
(gdb) n
Couldn't get registers: Kein passender Prozess gefunden.
(gdb) [Thread 0x7ffdad2496c0 (LWP 66618) exited]
[Thread 0x7ffdada4a6c0 (LWP 66617) exited]
[Thread 0x7ffdae24b6c0 (LWP 66616) exited]
```
Let me know if i can help with additional information.
### Steps to reproduce
1. open darktable
2. import image
3. open image in darkroom
4. add module "rgb curve"
5. add curve point
6. add second curve point
7. ...crash
### Expected behavior
should not crash
### Logfile | Screenshot | Screencast
_No response_
### Commit
_No response_
### Where did you install darktable from?
self compiled
### darktable version
4.5.0+786~g1439bb0eb6
### What OS are you using?
Linux
### What is the version of your OS?
Manjaro
### Describe your system?
RAM: 32 GB
CPU: AMD Ryzen™ 9 7900X3D, 12 Core, 24 Threads
GPU: AMD Radeon™ RX 7900 XTX
Display-Server: Wayland
GTK: 2.24.38-1
### Are you using OpenCL GPU in darktable?
Yes
### If yes, what is the GPU card and driver?
AMD Radeon™ RX 7900 XTX / amdgpu
### Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
_No response_