Lightroom: Possible file error/corruption

  • 1
  • Problem
  • Updated 6 years ago
  • Solved
  • (Edited)
I have now had several examples of NEF files downloaded and imported without problem a while ago now that I'm getting round to doing something with them, showing unexpected end-of-file errors or now getting the message 'there was an error working with the photo'. The NEFs appear OK unless that's just the preview file. I checked through the files briefly when I imported them and no warning signs showed and all preview images were fine. Now I am going through the files (and I have just reset the preference to write XMP files automatically) doing basic edits and files pop up with the warning triangles and appear corrupted for no apparent reason - even before I have started work on them as a couple more have shown up since this first happened. I am worried the whole catalogue is about to corrupt! Can anyone help please? The preview images look fine.
I am on PC, Windows 7, I import from the card into Lightroom. This issue only seems to have happened since upgrading to 4.1/4.2.
I have tried deleting the xmp file and reimporting the NEF and my husband has tried to import the file on his computer, but the error persists so it does appear to be properly corrupt!
Photo of Roo

Roo

  • 5 Posts
  • 0 Reply Likes
  • worried!

Posted 6 years ago

  • 1
Photo of jdv

jdv, Champion

  • 728 Posts
  • 56 Reply Likes
If the NEF "appears" in some other app is fine but Lr is complaining, then it is corrupt and the embedded preview is not showing this.

Most of the time, corruption is caused by a problem on the media, or the communication chain from the media to import. If you have the originals on the media still, try importing, but simplify down to copying it from the media to the desktop and import from there.

Alternatively, things are being corrupted on disk because of hardware problems. It depends on whether the corruption was detected on import or later.
Photo of Roo

Roo

  • 5 Posts
  • 0 Reply Likes
Thanks for replying.
So far the other files imported from the same card, same time, into a different folder aren't affected, hence I suspected LR. There was no sign of corruption at the time, no warning triangles etc... I will try the "copy first and import later" routine and see if that makes a difference.
I have seen references elsewhere to the metadata updating messing files up - could it be that? Anything else worth checking?
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes
It is very unlikely that Lr is fouling up your NEFs, since (barring some very strange and unlikely bug) it does not write to (proprietary) raw files (except when updating raw capture time).
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes
John's answer pretty much nails it, but still begs the question:

"What exactly went wrong when, and how do I keep it from happening in the future..."

If Lightroom "rendered previews from raw" OK after importing, then the corruption has occurred after import - probably a disk failure. To quote Jeff Schewe "there is zero chance Lightroom is at fault", however the truth is: the chance is greater than zero, although highly unlikely (there would need to be particularly insidious bug, since Lightroom should never be writing to those raw files, and probably isn't, *except* if you change capture time in the raws).

The problem is: it's not always clear when Lightroom is showing the jpeg preview, and when that has been replaced by a rendering of the raw data. It won't report any errors, if it hasn't yet tried to (needed to) render previews (and errors will not be in the form of a prompt, but a badge which you must look for / see).

In the future, I strongly recommend building previews during import, and visually inspecting all imported images *after* the previews have been built. If the images are corrupt after that, then it's not a camera/card/reader/cable/interface/driver... problem, but a storage integrity problem...

One way to get a report of all corrupt photos in the catalog is using TreeSyncPublisher v4.4.1+:

* Export in DNG format (full res, no preview, no lossy compression, and no fast-load data). This will force Lightroom to peruse the raw data, but not re-render it, and TreeSyncPublisher will detect and log corrupt files (ordinary built-in hard disk export will not detect corrupt files).

Another way to get report of corrupt photos: use the ordinary hard disk export but insert an export filter (post-process action), if you can find one. - any export filter will do (use same DNG format as specified above).

Note: force rendering all previews will (take a long time and) flag corrupt files via a badge on the thumbnail, but not generate a usable report, so you will still have to visually inspect each photo in the catalog.

UPDATE: related feature request:

http://feedback.photoshop.com/photosh...
Photo of Roo

Roo

  • 5 Posts
  • 0 Reply Likes
Thank you, that's very helpful, if somewhat cumbersome! I suspected I was in for some homework.... ;-D
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 382 Reply Likes
Unfortunately, there is no easy solution to this problem. Even the info I've given just helps to detect corruption, which you already know is existing sometimes. You've got to put on your "Sherlock Holmes" hat and do the trouble-shooting. There are a multitude of phases where corruption can occur, and you just have to find the one (assuming it is only one) where it is occurring. But if it's not happening during import, for certain (you can *not* be certain of this if you are only looking at embedded previews), then I'd certainly give the disk you are storing images on a good check. It's probably not a Lightroom bug, so you'll probably not get any relief from Adobe for this one.
Photo of Roo

Roo

  • 5 Posts
  • 0 Reply Likes
Many thanks; sounds like a 3-pipe problem!
Photo of Franco Ferretti

Franco Ferretti

  • 1 Post
  • 0 Reply Likes
I have the same problem but no solution for corrupted files. Any suggestion is welcome. thanks in advance