On macOS, editing a style, select all/none, and cancelling crashes the program
Describe the bug
On macOS, if I edit a style, click select all/none, and click cancel, darktable crashes.
Steps to reproduce
- Open darktable to lighttable view. You will need to have some saved styles.
- Click a style and click edit...
- Click "select all" or "select none".
- Click cancel.
Expected behavior
darktable should not crash.
Logfile | Screenshot | Screencast
Sorry I don't know how to get symbols when debugging on Apple Silicon.
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=2, address=0x600004d04220)
* frame #0: 0x0000600004d04220
frame #1: 0x0000600004d04220
frame #2: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #3: 0x000000010246ac2c libgtk-3.0.dylib`gtk_dialog_response + 92
frame #4: 0x0000000101c8d6c4 libgobject-2.0.0.dylib`_g_closure_invoke_va + 212
frame #5: 0x0000000101ca3264 libgobject-2.0.0.dylib`signal_emit_valist_unlocked + 2044
frame #6: 0x0000000101ca2a3c libgobject-2.0.0.dylib`g_signal_emit_valist + 64
frame #7: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #8: 0x00000001023fd3a4 libgtk-3.0.dylib`gtk_real_button_released + 240
frame #9: 0x0000000101c8d6c4 libgobject-2.0.0.dylib`_g_closure_invoke_va + 212
frame #10: 0x0000000101ca3264 libgobject-2.0.0.dylib`signal_emit_valist_unlocked + 2044
frame #11: 0x0000000101ca2a3c libgobject-2.0.0.dylib`g_signal_emit_valist + 64
frame #12: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #13: 0x00000001023fd8b8 libgtk-3.0.dylib`multipress_released_cb + 48
frame #14: 0x00000001023c065c libgtk-3.0.dylib`_gtk_marshal_VOID__INT_DOUBLE_DOUBLEv + 80
frame #15: 0x0000000101c8d6c4 libgobject-2.0.0.dylib`_g_closure_invoke_va + 212
frame #16: 0x0000000101ca3264 libgobject-2.0.0.dylib`signal_emit_valist_unlocked + 2044
frame #17: 0x0000000101ca2a3c libgobject-2.0.0.dylib`g_signal_emit_valist + 64
frame #18: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #19: 0x00000001024b92cc libgtk-3.0.dylib`gtk_gesture_multi_press_end + 128
frame #20: 0x0000000101c907cc libgobject-2.0.0.dylib`g_cclosure_marshal_VOID__BOXEDv + 116
frame #21: 0x0000000101c8d6c4 libgobject-2.0.0.dylib`_g_closure_invoke_va + 212
frame #22: 0x0000000101ca3264 libgobject-2.0.0.dylib`signal_emit_valist_unlocked + 2044
frame #23: 0x0000000101ca2a3c libgobject-2.0.0.dylib`g_signal_emit_valist + 64
frame #24: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #25: 0x00000001024b7e20 libgtk-3.0.dylib`_gtk_gesture_set_recognized + 88
frame #26: 0x00000001024b5cd8 libgtk-3.0.dylib`_gtk_gesture_check_recognized + 68
frame #27: 0x00000001024b7604 libgtk-3.0.dylib`gtk_gesture_handle_event + 248
frame #28: 0x00000001024bab74 libgtk-3.0.dylib`gtk_gesture_single_handle_event + 360
frame #29: 0x0000000102484af8 libgtk-3.0.dylib`gtk_event_controller_handle_event + 124
frame #30: 0x00000001026256c0 libgtk-3.0.dylib`_gtk_widget_run_controllers + 124
frame #31: 0x00000001023bbd38 libgtk-3.0.dylib`_gtk_marshal_BOOLEAN__BOXEDv + 124
frame #32: 0x0000000101c8d6c4 libgobject-2.0.0.dylib`_g_closure_invoke_va + 212
frame #33: 0x0000000101ca2dc4 libgobject-2.0.0.dylib`signal_emit_valist_unlocked + 860
frame #34: 0x0000000101ca2a3c libgobject-2.0.0.dylib`g_signal_emit_valist + 64
frame #35: 0x0000000101ca35ec libgobject-2.0.0.dylib`g_signal_emit + 28
frame #36: 0x00000001026252e8 libgtk-3.0.dylib`gtk_widget_event_internal + 300
frame #37: 0x00000001024fd53c libgtk-3.0.dylib`propagate_event + 388
frame #38: 0x00000001024fc960 libgtk-3.0.dylib`gtk_main_do_event + 1048
frame #39: 0x00000001015a250c libgdk-3.0.dylib`_gdk_event_emit + 64
frame #40: 0x00000001015c61e4 libgdk-3.0.dylib`gdk_event_dispatch + 52
frame #41: 0x0000000101b951a0 libglib-2.0.0.dylib`g_main_context_dispatch_unlocked + 236
frame #42: 0x0000000101b95494 libglib-2.0.0.dylib`g_main_context_iterate_unlocked + 400
frame #43: 0x0000000101b95718 libglib-2.0.0.dylib`g_main_loop_run + 120
frame #44: 0x00000001024fc3e4 libgtk-3.0.dylib`gtk_main + 92
frame #45: 0x0000000100bc0b24 libdarktable.dylib`dt_gui_gtk_run + 168
frame #46: 0x0000000100013e30 darktable`main + 296
frame #47: 0x00000001897e20e0 dyld`start + 2360
Commit
No response
Where did you obtain darktable from?
downloaded from www.darktable.org
darktable version
4.8.1
What OS are you using?
Mac
What is the version of your OS?
macOS 14.4
Describe your system?
2020 MacBook Air 8GB RAM, 256GB disk
Are you using OpenCL GPU in darktable?
Yes
If yes, what is the GPU card and driver?
M1 8GB unified memory
Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip
No response
Cannot reproduce on current master. Neither on macOS nor on Windows.
Not reproducible on Linux (Ubuntu 22.04) with dt 4.9.0+122~g72c4b1e338.
Reporter here, I can reproduce on macOS, with Darktable 4.8.1 ARM64 even with a fresh profile, but not on Windows or (I think) Linux. IDK if it's possible I accidentally installed a system GTK which is conflicting with Darktable.
Unlikely, the macOS bundle comes with its own GTK. What arm package have you downloaded from the release page?
darktable-4.8.1-arm64.dmg, sha256sum 1947ffb16f1fcc21d43c7bc7002e79f49fa82ee3d17a76832c11ee6b4d3cad73
Can you please try with a fresh config?
reproduces on fresh config:
nyanpasu64@mba /Applications/darktable.app/Contents/MacOS> ./darktable --configdir /tmp
(process:25541): GLib-GObject-CRITICAL **: 04:20:28.054: g_object_set: assertion 'G_IS_OBJECT (object)' failed
(darktable:25541): Gtk-CRITICAL **: 04:20:28.269: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed
39.5442 [pixelpipe_process CPU] buffer aligment problem: IN=0x1323d8040 OUT=0x150000000
39.8487 [pixelpipe_process CPU] buffer aligment problem: IN=0x1323d8040 OUT=0x30a020000
40.2150 [pixelpipe_process CPU] buffer aligment problem: IN=0x149bf0040 OUT=0x14a110000
42.3771 [pixelpipe_process CPU] buffer aligment problem: IN=0x1323d8040 OUT=0x150000000
43.4774 [pixelpipe_process CPU] buffer aligment problem: IN=0x1323d8040 OUT=0x348110000
fish: Job 1, './darktable --configdir /tmp' terminated by signal SIGBUS (Misaligned address error)
I tried debugging darktable under xcode, and it reports the disassembly of the crash site at:
-> 0x600005c52950: udf #0x61
0x600005c52954: udf #0x0
0x600005c52958: udf #0x0
0x600005c5295c: udf #0x0
0x600005c52960: .long 0xeff54271 ; unknown opcode
0x600005c52964: .long 0x01000001 ; unknown opcode
0x600005c52968: .long 0x07aec180 ; unknown opcode
0x600005c5296c: udf #0x6000
some sort of stale function pointer to unloaded code? i don't know.
- On macOS 14.6 (I've updated since filing the bug report), I noticed that clicking select all/none deselects the highlighted style in the main window, graying out the "edit"/etc. buttons in the main window. If I click the style being edited before cancelling the dialog, ~~darktable does not crash~~ it still does sometimes.
- The "edit" dialog is modal on Windows but not macOS 14.6. Combined with the main window graying out, and selecting the bug preventing the crash, I suspect the crash happens because the edit dialog fails to be modal, and clicking "select all/none" deselects the style in the main window (which doesn't happen on Windows because the main window is blocked by the modal dialog), which breaks an assumption of darktable's code.
I cannot reproduce anything of the points you describe here.
The "edit" dialog is modal on Windows but not macOS 14.6
Not true for me either. When the edit dialog is open I cannot click anything in the main window.
This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.
This issue was closed because it has been inactive for 300 days since being marked as stale. Please check if the newest release or nightly build has it fixed. Please, create a new issue if the issue is not fixed.