Random black thumbnails and editing screen

I’m using dt 3.4.1 on macOS Catalina 10.15.7. I use Rapid Photo Downloader to transfer files from camera SD cards to folders on a NAS share, and I import them into dt from there. I’ve been doing this routinely for ages, without issue.

Today, when I imported a folder of image files (504 files comprising pairs of RAW and JPG) into dt, many of the thumbnails were normal, but a random selection showed as black rectangles.

Some of these black thumbnails would open as full previews, showing the appropriate picture; but many opened previews that were just black.

When I tried to open files with black thumbnails in darkroom, they appeard as black on the editing screen. But if I zoomed the screen, the correct picture would show momentarily and zoom appropriately, but then return to black.

I’ve created new folders and reimported the same 504 files. An apparently random selection of different thumbnails appears black each time.

(I’m guessing a database has got corrupted, but I’ve no idea which, or how to fix it with least impact on my collection of 35,000+ image files.)

I’d be very grateful for any suggestions about how I might go about fixing this problem safely.

archie

PS I should say that I have weekly backups of my .cache/darktable folders, and Time Machine backups of dt itself.

You can try regenerating your thumbnail cache and/or deleting your openCL kernels if you use openCL.

You might also want to check your network, maybe darktable is timing out somehow? Or use the local copy feature to check this as well.

Is your darktable set to use embedded JPG previews, or half-size raw? This is with the dev version, 3.4 probably looks different:

Ah yes, I found it: in 3.4 the setting is called don’t use embedded preview JPEG but half-size raw:
https://www.darktable.org/usermanual/en/preferences-settings/lighttable/#thumbnails

If images cause negative numbers in the pipeline, you may get black rectangles. Boosted saturation and clipped shadows could trigger this.

@kofa
I have " don’t use embedded preview JPEG but half-size raw" selected. Are you saying it’s better not to select it?

If you select it, loading the lighttable will involve raw processing, and will thus be slower. I don’t use it; I was only asking because you’d written that both the thumbnails and the editor in the darkroom had the problem of black images.

@paperdigits @kofa
Many thanks to you both for your speedy and helpful replies. I decided to use the ‘nuclear’ option: I just restored darktable.app and ~/.cache/darktable from known-good copies with the same datestamp. All is now working well again.

Thanks again for generously giving your time to help.

archie.

1 Like

~/.cache/darktable will be fully rebuilt if you remove it; in fact, deleting the cached_kernels_... directory (or directories, if there are more of them) is recommended after upgrades; the mipmaps-... can also be safely removed.

@kofa
Sorry - my bad! I meant to say ~/.config/darktable