darktable-org / darktable-org/darktable
Crash when deleting mask in mask manager
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is there an existing issue for this?
- I checked and did not find my issue in the already reported ones
Describe the bug
Was deleting a mask and it crashed. I had already deleted quite a few masks before, so it's hard to replicate and seems a bit random, hopefully the stacktrace and crash report will be enough to get to the bottom of it.
Thread 1 (Thread 0x7fb1c2907200 (LWP 2177866) "darktable"): #0 0x00007fb1d76a0952 in ??? () at /usr/lib/libc.so.6 #1 0x00007fb1d770550b in wait4 () at /usr/lib/libc.so.6 #2 0x00007fb1e18086b6 in _dt_sigsegv_handler (param=11) at /run/media/nuno/vms_ssd/builds/darktable/src/common/system_signal_handling.c:97 pid = 2528401 name_used = 0x5602fb741ac0 "/tmp/darktable_bt_1LS4U3.txt" fout = <optimized out> delete_file = 0 datadir = "/opt/darktable-test/share/darktable", '\000' <repeats 4060 times> pid_arg = 0x5602fc155840 "2177866" comm_arg = 0x560302e85af0 "/opt/darktable-test/share/darktable/gdb_commands" logenable = 0x5602fbf28680 "set logging enabled on" setlogfile = 0x560301e0ea90 "set logging file /tmp/darktable_bt_1LS4U3.txt" #3 0x00007fb1d763e6f0 in <signal handler called> () at /usr/lib/libc.so.6 #4 0x00007fb1e188f364 in dt_iop_so_is_hidden (module=0x2) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/imageop.c:1291 #5 0x00007fb1e188f3ba in dt_iop_is_hidden (module=module@entry=0x56030164b4f0) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/imageop.c:1305 #6 0x00007fb1e18827c8 in _dev_auto_module_label (dev=0x5602f86d6510, module=0x56030164b4f0) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/develop.c:1221 is_default_params = <optimized out> preset_name = <optimized out> #7 _dev_add_history_item_ext (dev=0x5602f86d6510, module=0x56030164b4f0, enable=1, new_item=new_item@entry=0, no_image=0, include_masks=include_masks@entry=1, auto_name_module=1) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/develop.c:1262 kept_module = <optimized out> history = <optimized out> hist = <optimized out> #8 0x00007fb1e1882915 in dt_dev_add_masks_history_item_ext (dev=<optimized out>, _module=<optimized out>, _enable=<optimized out>, no_image=<optimized out>) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/develop.c:1549 module = <optimized out> enable = <optimized out> #9 0x00007fb1e1888e71 in dt_dev_add_masks_history_item (dev=0x5602f86d6510, module=0x56030164b4f0, enable=enable@entry=1) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/develop.c:1587 target = 0x0 form = <optimized out> gui = <optimized out> need_end_record = 1 #10 0x00007fb1e18d411b in dt_masks_form_remove (module=<optimized out>, grp=<optimized out>, form=form@entry=0x5602feed93a0) at /run/media/nuno/vms_ssd/builds/darktable/src/develop/masks/masks.c:2005 id = <optimized out> form_removed = <optimized out> #11 0x00007fb13c7e63e7 in _tree_delete_shape (button=<optimized out>, self=0x5602fa5a2800) at /run/media/nuno/vms_ssd/builds/darktable/src/libs/masks.c:1085 has_previous = <optimized out> has_next = <optimized out> prev_id = 1788029485 grid = 0 prev_iter = <optimized out> next_iter = 0x5603013a5780 prev_grid = 0 id = 1788029443 item = <optimized out> iter = {stamp = -1183366005, user_data = 0x5602fb9aec90, user_data2 = 0x0, user_data3 = 0x0} items_iter = 0x56030024cea0 = {0x5602fdba1d20} lm = 0x5602fa5a4dc0 model = 0x560301f35ce0 selection = 0x5602fa5a44a0 module = 0x56030164b4f0 items = 0x56030024cea0 = {0x5602fdba1d20} #12 0x00007fb1da327bcc in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0 #13 0x00007fb1da34784b in ??? () at /usr/lib/libgobject-2.0.so.0 #14 0x00007fb1da349a34 in ??? () at /usr/lib/libgobject-2.0.so.0 #15 0x00007fb1da349cd9 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #16 0x00007fb1da349d94 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #17 0x00007fb1d9f5968d in gtk_widget_activate () at /usr/lib/libgtk-3.so.0 #18 0x00007fb1d9e08bb1 in gtk_menu_shell_activate_item () at /usr/lib/libgtk-3.so.0 #19 0x00007fb1d9e0906c in ??? () at /usr/lib/libgtk-3.so.0 #20 0x00007fb1d9c73ca2 in ??? () at /usr/lib/libgtk-3.so.0 #21 0x00007fb1da349b7a in ??? () at /usr/lib/libgobject-2.0.so.0 #22 0x00007fb1da349cd9 in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0 #23 0x00007fb1da349d94 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0 #24 0x00007fb1d9f6e77e in ??? () at /usr/lib/libgtk-3.so.0 #25 0x00007fb1d9def7d5 in ??? () at /usr/lib/libgtk-3.so.0 #26 0x00007fb1d9df058b in gtk_main_do_event () at /usr/lib/libgtk-3.so.0 #27 0x00007fb1ddb3a1c7 in ??? () at /usr/lib/libgdk-3.so.0 #28 0x00007fb1ddb75dd0 in ??? () at /usr/lib/libgdk-3.so.0 #29 0x00007fb1da6fec76 in ??? () at /usr/lib/libglib-2.0.so.0 #30 0x00007fb1da700ed7 in ??? () at /usr/lib/libglib-2.0.so.0 #31 0x00007fb1da701217 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #32 0x00007fb1e195d863 in dt_gui_gtk_run (gui=0x5602f79d0cf0) at /run/media/nuno/vms_ssd/builds/darktable/src/gui/gtk.c:2224 widget = <optimized out> allocation = {x = 0, y = 0, width = 1190, height = 818} #33 0x00005602de17f265 in main (argc=<optimized out>, argv=<optimized out>) at /run/media/nuno/vms_ssd/builds/darktable/src/main.c:158 exitcode = <optimized out> [Inferior 1 (process 2177866) detached] backtrace written to /tmp/darktable_bt_1LS4U3.txt Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"... fish: Job 1, '/opt/darktable-test/bin/darktab…' terminated by signal SIGABRT (Abort)
Steps to reproduce
- Delete mask from mask manager
Expected behavior
No response
Logfile | Screenshot | Screencast
Commit
No response
Where did you obtain darktable from?
darktable.org / GitHub release
darktable version
5.7.0+665~g0f3921a8af-dirty
What OS are you using?
Linux
What is the version of your OS?
Arch
Describe your system
No response
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with _tree_delete_shape in src/libs/masks.c and dt_masks_form_remove in src/develop/masks/masks.c, then trace the history update through src/develop/develop.c and the crash site in src/develop/imageop.c. Reproduce mask deletion while watching the reported stack, and consider the issue done when deleting masks no longer causes the observed segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100