MacOS darktable 2.7 random crashing

On MacOS latest Mojave patch while in “full screen” mode it seems any action has the potential to crash the application. While not in the “full screen” mode it seems no crashes happen.

I am not sure this is 100% darktable as I have had Lightroom randomly crash as well before but that is super rare where in DT I can effectively guarantee it will happen in full screen mode.

I am going to do a clean install of MacOS to ensure it is not some weird interaction with another application running. If it still persists I will see what I can do about a bug report.

Posting here to bring it to some attention and see if anyone knows the proper procedure for a useful darktable bug report if it comes down to that.

i found tweaking opencl settings ( opencl_number_event_handles) reduced the amount of random crashes.

1 Like

Thanks will take a look into this.

@MStraeten I did try to reduce the number of event handles. By default it is like 25 and I got down to 15 and it still crashes almost instantly in Fullscreen mode. Not exactly sure why it is crashing the report dumb does not seem to be very helpful outside of it seeming like one of the threads seems to be accessing something it should not be causing the crash.

Did you try to disable opencl? just to be shure that its an opencl issue (commandline option — disable-opencl).
I increased the number of event handles to get more stability. Then i tweaked around with the opencl memory settings. But maybe it just was snake oil therapy …
Unfortunately I have too little time to get familiar with the debugger in osx.

Hi,

I’m getting similar issues, with or without OpenCL disabled.

When I am on an eGPU, the crash in instantaneous. When I’m on the discrete MacBook Pro GPU, it crashes after few seconds.
I am on 10.14.6 and using the last uploaded version of @MStraeten (thanks a lot by the way, as I have issues compiling my own version).

Amongst all the log, the last line before crash is always:

Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"..

or

31.472184 [dev_process_thumbnail] pixel pipeline processing took 0.641 secs (2.371 CPU)
2019-09-27 21:50:49.207 darktable-bin[93755:8705053] -[NSKeyValueObservance visibleFrame]: unrecognized selector sent to instance 0x7fd791d04820
2019-09-27 21:50:49.216 darktable-bin[93755:8705053] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSKeyValueObservance visibleFrame]: unrecognized selector sent to instance 0x7fd791d04820'

@blj do you get a similar error?

It looks to me an issue with thumbnail generation.

@Julien76 not sure. On my iMac I only crash when I use the green button to enter fullscreen mode not sure if yours is the same. The error I get is about invalid access to some memory address. When I am out of fullscreen I get no error. Only GPU I run is the built in AMD 560x. I have not had a chance to test without OpenCL as I have been busy. I am pretty sure your crash error is different then mine but I am not positive it could be related.

I prepared a new build, there were several commits in the last days - see current OSX Build - #20 by MStraeten

Thanks. I just tested it but I am getting the same crashes.
Actually even outside fullscreen now.

I also managed to finally build my own version form master, but same issues. Looking more in depth into the logs, it seems that it might be related to pixel pipe order on some images.

[_ioppr_check_rules] found rule rawprepare invert module invert (2.000000) is before rawprepare (8.000977) image 1991 (dt_dev_read_history_no_image end)
[_ioppr_check_rules] found rule rawprepare invert module rawprepare (8.000977) is after invert (2.000000) image 1991 (dt_dev_read_history_no_image end)
22.078519 [dev] took 1.262 secs (11.543 CPU) to load the image.
22.111106 [dev_pixelpipe] took 0.116 secs (0.914 CPU) processed `denoise (profiled)' on CPU, blended on CPU [thumbnail]
22.132897 [export] creating pixelpipe took 0.091 secs (0.706 CPU)
22.134188 [dev_pixelpipe] took 0.125 secs (0.988 CPU) processed `denoise (profiled)' on CPU, blended on CPU [thumbnail]
22.134909 [export] creating pixelpipe took 0.122 secs (0.963 CPU)
22.135112 [dev_pixelpipe] took 0.000 secs (0.000 CPU) initing base buffer [thumbnail]
Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...
[1]    70111 abort      /Applications/darktable.app/Contents/MacOS/darktable -d perf

I’m lacking time to investigate it more this weekend but next week I will look more into it, collect logs and open an issue on GitHub.

I can’t get a log file as the crash seems to happen instantly but I am seeing crashes when I scroll or select images in Lightable view …Win10 …started with 2.7-1889 and now tried updating and deleting all config and cache files …still happening though…2.7 - 1923 is current version…I guess I may have to go back to an earlier one…

May be the same issue …that can be problems with the pixelpipe and the way xmp files are read…

I don’t know. With the last version of the master branch, it only crashes when I’m on the eGPU and with an external screen.

If I only use DT on my MacBook Pro, then no issues but I haven’t tried full screen yet (on eGPU both non and full screen make DT crash, but it crashes more rapidly on full screen).

I still need to find time to investigate more.

Just had a chance to try the new build. Personally I am seeing no change. In normal mode everything seems to work. When fullscreen it crashes instantly upon clicking something in the gui. I am not sure what is going on. It seems both the new RT and DT are both having crash issues on the Mac. I wonder if there is some nasty GTK3 bug somewhere. Both crashes happen under different circumstances but all the Mac crash logs mention lots of GTK stuff.

I tried to get dt to run in debug mode but just a blanket -d does not want to work and I am not quite sure how else to use that.

Right now it seems on my Mac OpenSource raw processors are just not playing nice performance/crash wise. Kinda puts me in a bind as I am trying to move totally OpenSource for my photography. Maybe it is time to see if it is possible to get Linux on my iMac. Not sure how well it will play with the hardware and 4k screen tho. Really don’t have the cash to replace this machine atm with something more open.