Photos does a lot of extra work on import (merging RAW+JPEG pairs, generating previews, database indexing, optional deletion), so my guess is a concurrency bug where a buffer gets reused or a file handle is closed before the copy finishes.
Rare, nondeterministic corruption fits the profile.
I have had extremely bad luck, reporting bugs to Apple.
They constantly ask for an example project, even if it's something that is easily demonstrated, simply by running existing Apple software, and creating a project, would be a huge pain.
They also ignore reports. Very rarely, I may get a ping on one of my reports, asking me to verify that it was fixed in some release. Otherwise, there's no sign that they ever even read it.
I usually end up closing my bug reports and feature requests, after a few months, because I'm tired of looking at them.
It's clear that they consider every bug report to be a burden. That's a very strange stance, but then, they are not a typical company.
I guess you can't argue with the results, as they have a market value North of 3 trillion dollars, but that does not make it any less annoying.
Not to hand wave-- but this feels industry standard IMO. I have a dozen PRs sitting unacknowledged and stale across a handful of FAANG (and other) repos, including Apple's.
I start my first day @ Apple in a few weeks, so I ACK that my opinion might be a little biased here.
In the late 90s my then-wife was watching over my shoulder one day and saw the domain “freshmeat.net” pop up as a possible auto-completion in my address bar. She was justifiably suspicious until I showed her it was just a software distribution site.
It is simply hilarious to make grown adults visit a website called tender love making dot com (a sexual reference) to read a very specific and niche blog about technology.
I also have an OM System camera (OM-5) and never get corruption this bad but occasionally got one row of green pixels at the bottom of a photo during import to Photos. I thought I was crazy, but this motivates me to change up my routine and check if it was Photos all along.
I hadn’t dug that far in to it, thanks for sharing! I assumed my rather old SD card or the adapter I keep stuffed at the bottom of my bag was the issue as I’ve only seen it on a couple of photos.
I’ve used Olympus cameras for over a decade. Well, the same camera to be honest, a PEN E-PM2. This has only appeared in the past couple of years.
I haven’t seen it on photos from my Canon EOS 80D yet, but I guess it’s time to change my workflow. And maybe OS.
Not sure if related but importing images via image capture on mac to the disk of the mac gives you correct time when the photo was taken in the file (kind of important if it’s family photos). But if you import it to a usb drive you get current time as creation time for each file so you’ve lost any timestamp you had on the photos.
Fortunately it mentions early on in the article that this is related to an Olympus camera so I'm guessing this has something to do with the OM system's flavor of Olympus's proprietary ORF format.
He says the checksums are different but he doesn’t provide a diff to show how different. It could just be a single flipped bit or something. And that could happen in his own RAM/disk/CPU/router so seems premature to immediately blame Apple.
I ran both files through xxd then diffed them. I've literally changed every piece of hardware (at no small cost). "premature to immediately blame Apple" seems a bit off.
I tried running the file segments through a binary diff with Hex Fiend
As far as I can tell:
- 0x7800 bytes were replaced at file offset 0x00aa0000
- 0x2200 bytes were replaced at file offset 0x00aa8000
I can't tell if the replacement data came from a different part of the file, or somewhere totally different. Race condition somewhere sounds plausible.
This is the kind of stuff that makes me wish my Binary Diff Tool was already completed, but unfortunately I'm still working on it. Can't tell much what's wrong with the differences in the bytes without knowing what the structure behind it is.
No, it isn’t. The OP isn’t questioning whether the file changed, but asking what changed to the file, not what changed visibly.
The visible effect shown could be due to a change as small as a single bit flip. It also could be that large parts of the file got overwritten, or that it partially got zeroed. The exact kind of damage can help pinpoint the cause of the problem.
Yeah, I would have been interested in the diff too.
That said, the article does mention replacing basically all the hardware and still encountering the issue. FWIW, my personal experience with Apple software so far is that the usage expected for Average Joe is well tested and polished. But stepping outside of that, it's "Here be dragons" territory very quickly.
Image Capture did me dirty once. Macbook ran out of space while importing photos but it never stopped and kept on deleting photos from my iPhone. Lost 5K photos of a wedding... submitted a bug and hopefully it has been rectified.
For transferring files (photos or others) from iOS, I have been using Landrop for a while and never had any issues so far, it’s also way faster than using a cable.
I always wonder about the motivation behind these polished, high-quality programs on the App Store which are not open source, and also don't collect (much) data, neither have ads in them.
I used it along with another called Localsend, but the later one gave me a bit of headache and crashed while transferring some large files last time I used it, but still great as an alternative too, and it’s open source as well.
Edit: Actually, you are correct, it seems they did close it! Try localsend instead.
Love LocalSend. Can be a bit finicky but for quick transfers between systems I love it. Use it so my work laptop, Linux gaming PC, and iPhone can easily pass staff around.
> What's the purpose of RAW+jpg though? Seems rather redundant?
You get to keep out of camera jpg files. Some people might like how their camera processes jpg files and might also want the raw file for a scenario when a more complex editing is needed.
As I said in my blog post, it imports both and combines them in the UI. Also as I said in my blog post, I switched to shooting only in raw, and it still exhibited file corruption.
It seems to be an import pipeline bug.
Photos does a lot of extra work on import (merging RAW+JPEG pairs, generating previews, database indexing, optional deletion), so my guess is a concurrency bug where a buffer gets reused or a file handle is closed before the copy finishes.
Rare, nondeterministic corruption fits the profile.
This is also my guess. It's really a bummer, and I'd report it to Apple but since it's nondeterministic I have no idea how to provide repro steps.
I have had extremely bad luck, reporting bugs to Apple.
They constantly ask for an example project, even if it's something that is easily demonstrated, simply by running existing Apple software, and creating a project, would be a huge pain.
They also ignore reports. Very rarely, I may get a ping on one of my reports, asking me to verify that it was fixed in some release. Otherwise, there's no sign that they ever even read it.
I usually end up closing my bug reports and feature requests, after a few months, because I'm tired of looking at them.
It's clear that they consider every bug report to be a burden. That's a very strange stance, but then, they are not a typical company.
I guess you can't argue with the results, as they have a market value North of 3 trillion dollars, but that does not make it any less annoying.
> I guess you can't argue with the results, as they have a market value North of 3 trillion dollars
This was financed by equally massive technical debt.
Not to hand wave-- but this feels industry standard IMO. I have a dozen PRs sitting unacknowledged and stale across a handful of FAANG (and other) repos, including Apple's.
I start my first day @ Apple in a few weeks, so I ACK that my opinion might be a little biased here.
Have you tried copying the files to the local disk before importing?
I feel like this is a URL that I don't want in my history
In the late 90s my then-wife was watching over my shoulder one day and saw the domain “freshmeat.net” pop up as a possible auto-completion in my address bar. She was justifiably suspicious until I showed her it was just a software distribution site.
Infohazard warning:
C++ reference is one of these.
See also: Experts Exchange, Pen Island
And she wasn’t suspicious of amazon.com? ;)
As if "tender lovemaking" is so shocking?
Why? It's brilliant.
What's brilliant about it? What's the reference, for those of us unfamiliar?
It is simply hilarious to make grown adults visit a website called tender love making dot com (a sexual reference) to read a very specific and niche blog about technology.
ZScaler gets pissed off going to frame.work just because of a “malicious TLD”.
I don’t even want to know what ZScaler thinks of “tender love making”.
The URL might be mistaken for some different content?
Well, then don't browse from the church computer
Site belongs to Aaron Patterson, one off the most prolific Ruby developers in the world.
Something something Railed.
Nah that's just a one off
I also have an OM System camera (OM-5) and never get corruption this bad but occasionally got one row of green pixels at the bottom of a photo during import to Photos. I thought I was crazy, but this motivates me to change up my routine and check if it was Photos all along.
I hadn’t dug that far in to it, thanks for sharing! I assumed my rather old SD card or the adapter I keep stuffed at the bottom of my bag was the issue as I’ve only seen it on a couple of photos.
I’ve used Olympus cameras for over a decade. Well, the same camera to be honest, a PEN E-PM2. This has only appeared in the past couple of years.
I haven’t seen it on photos from my Canon EOS 80D yet, but I guess it’s time to change my workflow. And maybe OS.
Not sure if related but importing images via image capture on mac to the disk of the mac gives you correct time when the photo was taken in the file (kind of important if it’s family photos). But if you import it to a usb drive you get current time as creation time for each file so you’ve lost any timestamp you had on the photos.
Apple corrupted images on my iPhone where I can’t import them to my PC via photos, but I can backup the whole phone.
They finally recognized there is an issue, but there is no fix, as of a few weeks ago :(
Fortunately it mentions early on in the article that this is related to an Olympus camera so I'm guessing this has something to do with the OM system's flavor of Olympus's proprietary ORF format.
I’ve never had this bad of corruption. But not surprised.
Personally, I have seen a row of green pixels on the top or bottom + vertically flipped photos on import.
Good sleuthing!
He says the checksums are different but he doesn’t provide a diff to show how different. It could just be a single flipped bit or something. And that could happen in his own RAM/disk/CPU/router so seems premature to immediately blame Apple.
Here you go!
I ran both files through xxd then diffed them. I've literally changed every piece of hardware (at no small cost). "premature to immediately blame Apple" seems a bit off.I tried running the file segments through a binary diff with Hex Fiend
As far as I can tell:
- 0x7800 bytes were replaced at file offset 0x00aa0000
- 0x2200 bytes were replaced at file offset 0x00aa8000
I can't tell if the replacement data came from a different part of the file, or somewhere totally different. Race condition somewhere sounds plausible.
This is the kind of stuff that makes me wish my Binary Diff Tool was already completed, but unfortunately I'm still working on it. Can't tell much what's wrong with the differences in the bytes without knowing what the structure behind it is.
There's a corrupted photo at the top of the article and the non corrupt version at the bottom, is that not enough?
No, it isn’t. The OP isn’t questioning whether the file changed, but asking what changed to the file, not what changed visibly.
The visible effect shown could be due to a change as small as a single bit flip. It also could be that large parts of the file got overwritten, or that it partially got zeroed. The exact kind of damage can help pinpoint the cause of the problem.
Yeah, I would have been interested in the diff too.
That said, the article does mention replacing basically all the hardware and still encountering the issue. FWIW, my personal experience with Apple software so far is that the usage expected for Average Joe is well tested and polished. But stepping outside of that, it's "Here be dragons" territory very quickly.
He switched out his laptop.
"I’ve not seen any file corruption when importing to Darktable, so I am convinced this is a problem with the Photos app."
Yes this argument is a bit unconvincing for me. Not saying Apple photos doesn't corrupt his files, but this is not real proper investigating either.
See also the Image Capture bug from several years ago where it appends a ton of empty data to imported photos:
https://cdfinder.de/blog/files/image_capture_bug.html
(I'm not sure whether this bug has been fixed or not yet, though I think it has been fixed.)
Image Capture did me dirty once. Macbook ran out of space while importing photos but it never stopped and kept on deleting photos from my iPhone. Lost 5K photos of a wedding... submitted a bug and hopefully it has been rectified.
For transferring files (photos or others) from iOS, I have been using Landrop for a while and never had any issues so far, it’s also way faster than using a cable.
For transferring photos from your Iphone to your Mac, you can also use the native Image Capture app.
I always wonder about the motivation behind these polished, high-quality programs on the App Store which are not open source, and also don't collect (much) data, neither have ads in them.
It’s open source, else I wouldn’t recommended it
https://github.com/LANDrop/LANDrop
I used it along with another called Localsend, but the later one gave me a bit of headache and crashed while transferring some large files last time I used it, but still great as an alternative too, and it’s open source as well.
Edit: Actually, you are correct, it seems they did close it! Try localsend instead.
Love LocalSend. Can be a bit finicky but for quick transfers between systems I love it. Use it so my work laptop, Linux gaming PC, and iPhone can easily pass staff around.
You figured out how to teleport people through local send?
Coming Eventually:TM:
This article is about importing photos from an SD card to MacOS
[dead]
[flagged]
Why?
[flagged]
Where can I get professional-grade toothpicks?
Ask your dentist.
This is what you get when you buy consumer hardware.
And when your Toyota breaks down, we'll all be there to tell you that you should have bought a military-spec truck.
i am constantly noticing things about my iphone. its poorly designed.
> Turns out “delete after import” was a huge mistake.
That's a mistake no mater what application you're importing to, else we'll be graced with another blog post, "Darktable app Corrupts Photos".
What's the purpose of RAW+jpg though? Seems rather redundant?
> That's a mistake no mater what application you're importing to, else we'll be graced with another blog post, "Darktable app Corrupts Photos"
Thanks dad.
> What's the purpose of RAW+jpg though? Seems rather redundant?
You get to keep out of camera jpg files. Some people might like how their camera processes jpg files and might also want the raw file for a scenario when a more complex editing is needed.
Interesting, based on this and other replies, it sounds like Photos App should have an option to select what to import? i.e. RAW or jpg, but not both.
It sounds like Photos App can have issues trying to import both at the same time?
As I said in my blog post, it imports both and combines them in the UI. Also as I said in my blog post, I switched to shooting only in raw, and it still exhibited file corruption.
I also use RAW+JPG. Latter part allows quick sharing without long post-processing, esp. for impatient friends.
If I'm going to share the photo to an album or something, I process the RAWs selectively.
JPG so you can also see the default camera processing which might be work well from time to time. RAW in case it doesn't.
I don't know why this is downvoted.