How can this weird file corruption have occured?

2

2

I took some photos, put the SD card into my Windows 10 PC, copied the images to my primary drive (an SSD), then as I'm generally paranoid and as these were important family photos, binary diffed the source and the copy. One file was different (of the ~300 files, ~2GB). I rescanned it. Still different. I then viewed the files in a hex diff viewer, and that screen capture is below.

I've seen corruption occur before but never like this. There are maybe 30 bytes total that have changed, but they aren't contiguous, though they are in the same range (but each change has random gaps of 10-30 bytes between them). Usually when I've seen corruption it'll be one contiguous area corresponding to a block on the disk or a network packet or something.

When I used a picture diff program it knew there was a difference, but visually both images were fine and the blended diff between them didn't show any weird/corrupt area.

I recopied the file, and the new copy was just as it should have been.

But, I'm just stumped and now super paranoid, I just diffed copied files out of an abundance of caution, not because I actually expected this sort of problem to happen. How can this happen, and happen like this? Are my fears real and I now need to worry about all file writes/copies being potentially corrupted?

Thanks!

diff hex view

Quincy

Posted 2016-11-23T21:55:32.100

Reputation: 21

What format are the pictures? – Dave – 2016-11-23T22:00:45.407

@Dave They're JPG files. – Ben N – 2016-11-23T22:05:05.677

Answers

0

I'd look for a program, preferably from the manufacturer, and run tests on the media. The SD card is a RAM type of device and damage to the memory won't necessarily confine itself to a contiguous block especially if there was some sort of wear-leveling involved. I've seen similar problems with USB flash drives where most of the files are fine, some get corrupted.

Blackbeagle

Posted 2016-11-23T21:55:32.100

Reputation: 6 424

But, the problem couldn't be with the SD card could it, since that was the source of the copy, I assumed the problem wasn't on read but on write (to the SSD hard disk). What you say could apply to the SSD, of course. – Quincy – 2016-11-24T03:26:14.513

@Quincy, could it be an intermittent problem with reading from the SD card? SD cards are much more cheaply manufactured than SSDs, I think, and probably much more likely to suffer from wear, depending on how you use your camera and what wear-leveling exists in each storage medium. – Mathieu K. – 2016-11-24T05:31:54.583