DT was running on Archlinux, and this is the version:
$ darktable --version
this is darktable 4.0.0
copyright (c) 2009-2022 johannes hanika
darktable-dev@lists.darktable.org
compile options:
bit depth is 64 bit
normal build
SSE2 optimized codepath enabled
OpenMP support enabled
OpenCL support enabled
Lua support enabled, API version 8.0.0
Colord support enabled
gPhoto2 support enabled
GraphicsMagick support enabled
ImageMagick support disabled
OpenEXR support enabled
My camera is a Canon 90D. SD card is kind of old, maybe a few years. But I’m not sure if it’s faulty. In google drive the raw file looks fine. It only looks weird in DT.
Just a final comment as you shot a burst. Have you tried to do repeated burst shots and check if this could be not a single issue? Could be a firmware problem in your camera. Had such an issue too, that was a Leica and they fixed it.
Edit: could also happen if you change raw data by exiv2 or exiftool in write mode and there is a bug in that soft.
Once I had an SD card that didn’t work reliably in my Nikon DSLR, but always tested fine when I wrote to it using my card reader, and never had problems in my wife’s Panasonic compact camera.
I also saw something similar before on a Canon DSLR way back in the day with a CF card. (This is well over a decade ago.) Some photos would become corrupted similar to this if I didn’t format the card in the camera directly.
I’ve also had filesystem corruption on both CF and SD cards before when I didn’t format it directly in the camera, but formatted it on a computer instead. (When this happened, PhotoRec saved the day!)
Formatting (in-camera) instead of erasing images from your media is good to do too.
Theoretically, it shouldn’t make a difference, but the firmware of cameras can be finicky when it comes to how the filesystem is created, and your computer might do it slightly different.
Good advice, even though it didn’t work for that specific card. I always format at card in the camera.
Interestingly, I also had random corruption with an SD card (a different one) and a Raspberry Pi. I did some research and found a very long discussion about the topic, but ended up with using the card in another device, and using a different card in the Pi. It seems there is some slack in the SD specs that can lead to rare and weird issues.
Both cases (the one with the camera and the one with the Pi) happened a long time ago.