darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Copy&import-dialogue-issue on mac m1 pro (Sonoma)

Open nogger-what opened this issue 2 years ago • 45 comments

Describe the bug

Hello everyone,

I'm new here and have never posted a request before so excuse my awkward post! I have just installed dt 4.6 on my macbook 14 m1 pro (I have been using dt successfully for years!). My problem occurs when I open the copy&import-dialogue: Here, dt shows me the dialogue attached.

Choosing either option will crash dt, giving me the following termination reason in the crash report:

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

Can anybody help?

Steps to reproduce

  1. Shortcut copy&import
  2. Click "verstanden&eingestellt"
  3. crash!

Expected behavior

darktable should open the proper "copy&import-dialogue"

Logfile | Screenshot | Screencast

Bildschirmfoto 2023-12-26 um 09 12 58

Commit

No response

Where did you obtain darktable from?

downloaded from www.darktable.org

darktable version

4.6.0

What OS are you using?

Mac

What is the version of your OS?

14.2.1

Describe your system?

No response

Are you using OpenCL GPU in darktable?

Yes

If yes, what is the GPU card and driver?

Chipsatz-Modell: Apple M1 Pro Typ: GPU Bus: Integriert Gesamtanzahl der Kerne: 16 Hersteller: Apple (0x106b) Metal-Unterstützung: Metal 3

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

No response

nogger-what avatar Dec 26 '23 08:12 nogger-what

did you check the import target directory?

please run darktable from terminal via /Applications/darktable.app/Contents/MacOS/darktable -d common to get some further infos.

MStraeten avatar Dec 26 '23 11:12 MStraeten

Hi MStraten,

thanks a lot for dealing with my issue and responding so fast! It's people like you who make the darktable experience all the more worthwhile! I have checked the import target directory: it is the same as in my previous version of darktable. I have even tried to create a new one but the problem was the same. I have also deleted and reinstalled dt but no luck. If I click on the left hand option of above's screen (screenshot), dt does not crash; instead, I get a black screen that shows me little windows with the file name of my raw files when I hover over them:(

Here's what I get when I run darktable from the terminal as you requested:

(darktable:7107): Gtk-CRITICAL **: 20:23:07.390: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed 2023-12-26 20:23:10.149 darktable[7107:158400] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:. xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcr

I hope this might give you a clue! Thanks again for your help, I really appreciate it!

Peter

nogger-what avatar Dec 27 '23 06:12 nogger-what

Sorry, I missed some data out in above's terminal report:

40673,4816 Session fullpipe cache report. hits/run=0,00, hits/test=0,000 [opencl_summary_statistics] device 'Apple Apple M1 Pro' (0): NOT utilized Macbook-M1:~ ICH$ /Applications/darktable.app/Contents/MacOS/darktable -d common darktable 4.6.0 Copyright (C) 2012-2023 Johannes Hanika and other contributors.

Compile options: Bit depth -> 64 bit Debug -> DISABLED SSE2 optimizations -> DISABLED OpenMP -> ENABLED OpenCL -> ENABLED Lua -> ENABLED - API version 9.2.0 Colord -> DISABLED gPhoto2 -> ENABLED GMIC -> ENABLED - Compressed LUTs are supported GraphicsMagick -> ENABLED ImageMagick -> DISABLED libavif -> ENABLED libheif -> ENABLED libjxl -> ENABLED OpenJPEG -> ENABLED OpenEXR -> ENABLED WebP -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation. See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

 0.0001 application_directory: /Applications/darktable.app/Contents/MacOS
 0.0001 darktable.datadir: /Applications/darktable.app/Contents/Resources/share/darktable
 0.0002 darktable.plugindir: /Applications/darktable.app/Contents/Resources/lib/darktable
 0.0002 darktable.localedir: /Applications/darktable.app/Contents/Resources/share/locale
 0.0002 darktable.configdir: /Users/SCHULE/.config/darktable
 0.0002 darktable.cachedir: /Users/SCHULE/.cache/darktable
 0.0003 darktable.sharedir: /Applications/darktable.app/Contents/Resources/share
 0.0003 darktable.tmpdir: /private/var/folders/81/ynvwv1kn2yqdqtmf5zb3b4d40000gs/T
 0.0003 new_xdg_data_dirs: (null)

nogger-what avatar Dec 27 '23 06:12 nogger-what

First run darktable with a clean config i.e. rename /Users/SCHULE/.config/darktable to something different so you don’t lose the content while a clean config is created on start.

Second do you have XCode or XCode commandline tools installed? Then running darktable via debugger might help to find what exactly crashes. lldb /Applications/darktable.app/Contents/MacOS/darktable

MStraeten avatar Dec 27 '23 08:12 MStraeten

Sorry, MStraeten, getting completely stuck because I'm actually pretty computer illiterate (maybe I shouldn't be using darktable, I know!)

  • can't locate dt's config file on my computer (even after extensive googling)
  • this means I can't change it either
  • I have no concept of debugging
  • I have downloaded and installed XCode but have no idea what to do with it
  • I feel I am stretching your patience:))

Maybe I'll ask my son once he is awake to teach me some computer basics! In 5 years of using dt I have not had issues like this, sorry. Maybe I'll just have to wait for the next version? Sorry to bother you like this...

nogger-what avatar Dec 27 '23 09:12 nogger-what

issue aren’t fixed automatically by time, so if there’s an issue we need your help to find it ;) to locate dt config directory you need to enable the display of hidden files via shift+command+. (to hide them again use the same key combination)

MStraeten avatar Dec 27 '23 11:12 MStraeten

Hi Martin, I renamed the config file and dt is running fine as usual, however, I seem to have lost all my data:( Maybe I misunderstood you and did the wrong thing. Obviously, I have a backup of my raw files, but all my edits, tags, collections, etc. are probably lost? Oh dear, what have I done?

nogger-what avatar Dec 27 '23 17:12 nogger-what

you can recover, just shut down dt, then change your renamed "config file" back.

sounds like maybe you renamed the directory rather than the "config file".

ptilopteri avatar Dec 27 '23 18:12 ptilopteri

and maybe before you do that, you rename the current "config file" to something different than your earlier rename.

ptilopteri avatar Dec 27 '23 18:12 ptilopteri

Ok, I stupidly had renamed the directory! However, now that I've renamed the actual config file I'm back to square 1. Worse even, same problem occurring (can't import images) AND data loss (no collections, tags, etc.):(

nogger-what avatar Dec 27 '23 18:12 nogger-what

I'm afraid I don't seem to be getting anywhere and I will have to call it a day. I'll try and make a fresh start tomorrow! Thanks for your help anyway!

nogger-what avatar Dec 27 '23 18:12 nogger-what

not sure what's the config file you mentioned... did you rename /Users/SCHULE/.config/darktable to something different eg /Users/SCHULE/.config/darktable.bck? then it's quite ok, you didn't see any collections - since those are within the renamed directory and of course not in the newly generated directory. So it's all about the config, not the installation ;)

--> if darktable runs fine with this fresh config directory, then you can copy data.db and library.db from your renamed directory to that new generated one. This will bring back the collections, tags, etc.

alternative: delete that new generated .config/darktable directory and rename you formerly renamed directory back to /Users/SCHULE/.config/darktable but then rename the file darktablerc within that directory to e.g. darktablerc.bck so just the configuration will be recreated.

MStraeten avatar Dec 27 '23 18:12 MStraeten

Good morning, Martin! I have renamed my config file to /Users/SCHULE/.config/darktable.bck, following your suggestion. That seems to create a fully functioning version of darktable (no copy&import issues), except I cannot see my previously created data (collections, etc.), even after copying the two files you mentioned. My old config folder (the one I renamed) seems to contain a number of files referring to my old data (libraries, luas, styles, data, etc.) so I don't think I have deleted anything, it will just not show in my latest version of darktable:( I am determined to work this out as darktable is my one and only, even if it means I have to start from scratch. Problem seems to be that I don't seem to be able to import my picture database from my external SSD-Drive (some 29000 pictures) - dt only shows two pictures:/ I'm sure if you bear with me we'll get me going again...

nogger-what avatar Dec 28 '23 06:12 nogger-what

Another issue is now that in the import dialogue I cannot see a preview of the files I'm going to import. Dt will only show me the darktable icon with a santa hat...

nogger-what avatar Dec 28 '23 06:12 nogger-what

if after copying data.db and library.db from your /Users/SCHULE/.config/darktable.bck to /Users/SCHULE/.config/darktable no collections etc occurs then there might be an issue with those files. So you might try to copy one of the automatically generated backup files (data.db-pre-4.6.0 and library.db-pre-4.6.0 or one of the most recent snapshots like data.db-snp-... or library.db-snp-...) into the new generated /Users/SCHULE/.config/darktable directory and rename them to data.db or library.db if that brings back your collections etc. then it's time to adress further configuration stuff...

MStraeten avatar Dec 28 '23 06:12 MStraeten

Hi Martin, once again, I'd like to thank you for your help and your time but I have decided to give up. I'm afraid, dt is probably not for people like me, it will just not run properly on my computer and I do not have the time to tweak any more. This is a real shame because I love the programme and would like to be able to use it but it won't work for me with my current setup. I'm sure I'll come back to it at a later stage. Your help was much appreciated and people like yourself have so much to give but when they're trying to help people like me it's just a waste of time. Anyway, thanks again!

nogger-what avatar Dec 29 '23 07:12 nogger-what

I had the same error after upgrading from Darktable 4.4 to 4.6, but on System Linux Ubuntu 22.04.3 LTS.

I found a possible reason in https://github.com/darktable-org/darktable/pull/15894

DT begins to scan slowly and recursively all files in the start-folder. The option to switch off the recursiv-option is unfortunately in the window that freezes.

So I edited the file "~/.config/darktable/darktablerc" with a text-editor.

In the line "ui_last/import_recursive=TRUE" I changed the value to "FALSE". Now an Import is possible.

wwwFrank avatar Jan 23 '24 16:01 wwwFrank

Unfortunately I have the same issue om DT 4.6.1. on macOS Sonoma 14.2.1

After clicking Copy and Import, I get a full screen reminder prompt to adjust import settings. It doesn't matter which decision is made, after clicking, the screen goes black and DT freezes.

"ui_last/import_recursive=FALSE" was standard like this in darktablerc Adjusting it to TRUE didn't help either.

Sebby319 avatar Feb 25 '24 19:02 Sebby319

After clicking Copy and Import, I get a full screen reminder prompt to adjust import settings.

I cannot reproduce on an Intel Mac with Sonoma:

Bildschirmfoto 2024-02-26 um 13 34 31

German: Bildschirmfoto 2024-02-26 um 13 35 20

After clicking on one of the buttons the import continues as usual.

zisoft avatar Feb 26 '24 12:02 zisoft

This is what I'm getting (in Dutch) on my M1 Pro Macbook Pro Scherm­afbeelding 2024-03-07 om 12 18 47

When I click either of the 2 buttons, the screen turns totally black and DT freezes. I've waited a few minutes before killing the application.

I'm back from th US again, so I can run some tests with logs.

Sebby319 avatar Mar 07 '24 11:03 Sebby319

This is what I'm getting (in Dutch) on my M1 Pro Macbook Pro Scherm­afbeelding 2024-03-07 om 12 18 47

When I click either of the 2 buttons, the screen turns totally black and DT freezes. I've waited a few minutes before killing the application.

I'm back from th US again, so I can run some tests with logs.

Have the same issue with DT 4.6.1 on Intel MacBook Pro with MacOS 12.7.4

ZhenyaPro avatar Mar 12 '24 16:03 ZhenyaPro

MacOS 12.7.4

@MStraeten: These are clearly the MacPorts builds. Can you reproduce?

@Sebby319: Because you are on macOS 14.x, can you try with darktable-4.6.1-arm64.dmg from the release page and report here.

zisoft avatar Mar 12 '24 17:03 zisoft

not reproducible with my macports based 4.6.1 build on my machine

MStraeten avatar Mar 13 '24 06:03 MStraeten

@Sebby319: Because you are on macOS 14.x, can you try with darktable-4.6.1-arm64.dmg from the release page and report here.

I got this issue using an upgraded DT 4.6.1 using the *.dmg you are mentioning coming from 4.4.2.

Sebby319 avatar Mar 13 '24 07:03 Sebby319

qSebby319, ZhenyaPro: did you also tried to reproduce that issue with a clean darktable config? (i.e. rename ~/.config/darktable to something different so you don’t lose the content while a clean config is created on start.) What's the output of running darktable with debug messages (/Applications/darktable.app/Contents/MacOS/darktable -d common)? Me-too statements without further information doesn't help ...

MStraeten avatar Mar 13 '24 10:03 MStraeten

qSebby319, ZhenyaPro: did you also tried to reproduce that issue with a clean darktable config? (i.e. rename ~/.config/darktable to something different so you don’t lose the content while a clean config is created on start.)

I did try that, according to your previous recommendation. But without succes.

I'll run DT with debug message later today and post the output here.

Sebby319 avatar Mar 13 '24 11:03 Sebby319

Here is the log dump from startup to clicking the Copy and Import followed by a crash: `darktable 4.6.1 Copyright (C) 2012-2024 Johannes Hanika and other contributors.

Compile options: Bit depth -> 64 bit Debug -> DISABLED SSE2 optimizations -> DISABLED OpenMP -> ENABLED OpenCL -> ENABLED Lua -> ENABLED - API version 9.2.0 Colord -> DISABLED gPhoto2 -> ENABLED GMIC -> DISABLED - Compressed LUTs are NOT supported GraphicsMagick -> DISABLED ImageMagick -> ENABLED libavif -> ENABLED libheif -> ENABLED libjxl -> ENABLED OpenJPEG -> ENABLED OpenEXR -> ENABLED WebP -> ENABLED

See https://www.darktable.org/resources/ for detailed documentation. See https://github.com/darktable-org/darktable/issues/new/choose to report bugs.

 0.0001 application_directory: /Applications/darktable.app/Contents/MacOS
 0.0001 darktable.datadir: /Applications/darktable.app/Contents/Resources/share/darktable
 0.0001 darktable.plugindir: /Applications/darktable.app/Contents/Resources/lib/darktable
 0.0002 darktable.localedir: /Applications/darktable.app/Contents/Resources/share/locale
 0.0002 darktable.configdir: /Users/sebastiaanvijfhuizen/.config/darktable
 0.0002 darktable.cachedir: /Users/sebastiaanvijfhuizen/.cache/darktable
 0.0002 darktable.sharedir: /Applications/darktable.app/Contents/Resources/share
 0.0003 darktable.tmpdir: /private/var/folders/wg/b5xplxkj4zl_qdpw_x9jl1h40000gn/T
 0.0003 new_xdg_data_dirs: (null)

(process:25668): GLib-GObject-CRITICAL **: 20:33:31.827: g_object_set: assertion 'G_IS_OBJECT (object)' failed 0,0594 [dt_worker_threads] using 6 worker threads 0,0598 [dt_configure_runtime_performance] found a sufficient 64-bit system with 16384 Mb ram and 10 cores 0,0599 [dt_get_sysresource_level] switched to 2 as `large' 0,0599 total mem: 16384MB 0,0599 mipmap cache: 2048MB 0,0599 available mem: 11200MB 0,0599 singlebuff: 256MB 0.0607 [opencl_init] opencl disabled via darktable preferences 0.0612 [opencl_init] opencl library '/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL' found on your system and loaded, preference 'default path' 0.0613 [opencl_init] found 1 platform [opencl_init] found 1 device

[dt_opencl_device_init] DEVICE: 0: 'Apple M1 Pro' PLATFORM, VENDOR & ID: Apple, Apple, ID=16940800 CANONICAL NAME: appleapplem1pro DRIVER VERSION: 1.2 1.0 DEVICE VERSION: OpenCL 1.2 DEVICE_TYPE: GPU, unified mem GLOBAL MEM SIZE: 10923 MB MAX MEM ALLOC: 2048 MB MAX IMAGE SIZE: 16384 x 16384 MAX WORK GROUP SIZE: 256 MAX WORK ITEM DIMENSIONS: 3 MAX WORK ITEM SIZES: [ 256 256 256 ] ASYNC PIXELPIPE: NO PINNED MEMORY TRANSFER: NO AVOID ATOMICS: NO MICRO NAP: 250 ROUNDUP WIDTH & HEIGHT 16x16 CHECK EVENT HANDLES: 128 TILING ADVANTAGE: 0.000 DEFAULT DEVICE: NO KERNEL BUILD DIRECTORY: /Applications/darktable.app/Contents/Resources/share/darktable/kernels KERNEL DIRECTORY: /Users/sebastiaanvijfhuizen/.cache/darktable/cached_v3_kernels_for_AppleAppleM1Pro_1210 CL COMPILER OPTION: -cl-fast-relaxed-math CL COMPILER COMMAND: -w -cl-fast-relaxed-math -DAPPLE=1 -I/Applications/darktable.app/Contents/Resources/share/darktable/kernels KERNEL LOADING TIME: 0.0365 sec [opencl_init] OpenCL successfully initialized. internal numbers and names of available devices: [opencl_init] 0 'Apple Apple M1 Pro' 0.1085 [opencl_init] FINALLY: opencl is AVAILABLE and NOT ENABLED. [dt_opencl_update_priorities] these are your device priorities: [dt_opencl_update_priorities] image preview export thumbs preview2 [dt_opencl_update_priorities] 0 -1 0 0 -1 [dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe: [dt_opencl_update_priorities] image preview export thumbs preview2 [dt_opencl_update_priorities] 0 0 0 0 0 [opencl_synchronization_timeout] synchronization timeout set to 200 UNIFIED MEM SIZE: 4096 MB reserved for 'appleapplem1pro' [dt_opencl_update_priorities] these are your device priorities: [dt_opencl_update_priorities] image preview export thumbs preview2 [dt_opencl_update_priorities] 0 -1 0 0 -1 [dt_opencl_update_priorities] show if opencl use is mandatory for a given pixelpipe: [dt_opencl_update_priorities] image preview export thumbs preview2 [dt_opencl_update_priorities] 0 0 0 0 0 [opencl_synchronization_timeout] synchronization timeout set to 200 0,1680 [dt_worker_threads] using 6 worker threads

(darktable:25668): Gtk-CRITICAL **: 20:33:32.011: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW (window)' failed sqlite3 error: /Users/runner/work/darktable/darktable/src/src/gui/presets.c:90, function dt_gui_presets_init(), query "DELETE FROM data.presets WHERE writeprotect = 1": attempt to write a readonly database 0,5640 [imageop_init_presets] updating 'borders' preset '15:10 briefkaart wit' from version 3 to version 4 to:'gz03eJxjYGiwZ4DjA/bGVkYM2MDZM2dsgZS9oT5WeVziYDlkDiOUBgDeXAhg' 0,5641 [imageop_init_presets] updating 'borders' preset '15:10 briefkaart zwart' from version 3 to version 4 to:'gz03eJxjYEAGB+yNrYwYsIGzZ87YAil7Q32s8rjEwXIMDA1wzAgVBAD+eQhg' 1,0198 [imageop_init_presets] updating 'sigmoid' preset 'neutraal grijs' from version 1 to version 3 to:'f6289c3f6666263f0000c8426c09793c000000000000c8420000000000000000000000000000000000000000000000000000000000000000' 1,0199 [imageop_init_presets] updating 'sigmoid' preset 'ACES 100-nit zoals' from version 1 to version 3 to:'cdcccc3fcdcc4cbe0000c8426c09793c00000000000000000000000000000000000000000000000000000000000000000000000000000000' 1,0199 [imageop_init_presets] updating 'sigmoid' preset 'Reinhard' from version 1 to version 3 to:'0000803f000000000000c8426c09793c01000000000000000000000000000000000000000000000000000000000000000000000000000000'sqlite3 error: /Users/runner/work/darktable/darktable/src/src/libs/modulegroups.c:1337, function _preset_retrieve_old_presets(), query "DELETE FROM data.presets WHERE operation = 'modulelist' AND op_version = 1": attempt to write a readonly database

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_offscreen_window_get_embedder: assertion 'GDK_IS_WINDOW (window)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_quartz_impl: assertion 'GDK_IS_WINDOW_IMPL_QUARTZ (window->impl)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_state: assertion 'GDK_IS_WINDOW (window)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_scale_factor: assertion 'GDK_IS_WINDOW (window)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_offscreen_window_get_embedder: assertion 'GDK_IS_WINDOW (window)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_quartz_impl: assertion 'GDK_IS_WINDOW_IMPL_QUARTZ (window->impl)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_offscreen_window_get_embedder: assertion 'GDK_IS_WINDOW (window)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_quartz_impl: assertion 'GDK_IS_WINDOW_IMPL_QUARTZ (window->impl)' failed

(darktable:25668): Gdk-CRITICAL **: 20:33:47.952: gdk_window_get_toplevel: assertion 'GDK_IS_WINDOW (window)' failed zsh: segmentation fault /Applications/darktable.app/Contents/MacOS/darktable -d common `

Sebby319 avatar Mar 13 '24 19:03 Sebby319

Sidenote: When removing the "darktable" folder for a clean startup. Everything works fine. The Dialog is behaving normal and clicking a button results in expected behavior. Only when the darktablerc file is replaced by the 4.4.2 version in a fresh made "darktable" folder, the crash happens.

Sebby319 avatar Mar 13 '24 19:03 Sebby319

attempt to write a readonly database

Check the file permissions of library.db and data.db in your config folder.

zisoft avatar Mar 13 '24 20:03 zisoft

Check the file permissions of library.db and data.db in your config folder.

Thank you! Permissions of 'data.db' were read-only for the user. Changed it and the message went away. Well spotted :)

The issue of this topic stayed though. So fixing the permissions of these files, doesn't fix the issue.

Sebby319 avatar Mar 14 '24 20:03 Sebby319