• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.
  • 12 December 2024 It's Lightroom update time again! See What’s New in Lightroom Classic 14.1, Mobile & Desktop (December 2024)? for Feature updates, new cameras and lenses, and bug fixes.

Unexpected end of file in NEF

Status
Not open for further replies.

Califdan

Dan Hartford Photo (Senior Member)
Lightroom Guru
Premium Classic Member
Premium Cloud Member
Joined
May 9, 2015
Messages
2,975
Location
Palo Alto, CA
Lightroom Experience
Power User
Lightroom Version
Classic
Lightroom Version Number
12.3
Operating System
  1. Windows 10
  2. macOS 13 Ventura
Hi,

I have a client with a Nikon D7100 (I don't shoot Nikon) who is shooting RAW (only). The import goes ok other than a couple of images that "could not be imported". However all but 1 (of 154) of those that did import show up with the "LR encountered errors" icon

1684886739210.png

She is also running on a Mac (I'm Windows). I copied some of the NEF files to my computer and the same thing happens in my Windows Machine. So it does not appear to be realted to her install of LR and if this were an LrC bug I'm sure it would have been all over the forums.

On her mac, when we try to open one of these NEF's by double clicking on it in Finder, it opens the file in something called "Preview" but only the top half of the image is displayed and there is only black where the bottom half should be.

At this point, tried the Adobe DNG converter on the 6 images of hers I have on my computer. It converted none of them but rather gave this error ("There was an unexpected end of file error". This, of course, expalains what "Preview" showed
1684887328748.png


So, as LrC was showing previews for all the imported NEF's, my next step was to try JFreidl's "Preview Extraction" plugin on the 6 or so copies of her NEF's I have on my computer and it produced JPG's of 4000 x 6000 pixels (same as the RAW files) which was a pleasant surprise. I then installed the plugin on her machine and extracted the previews from all 154. However, and here's where it gets weirder, about a third of the way through the list of images, suddenly the dimensions of the extracted previews dropped from 4000x6000 to something around 640 by something (forgot to take screen shot). She claims that she did not make any camera setitng changes, other than, perhaps, going to program mode and noticing that her ISO had switched to Auto ISO. but on a shoot who knows what buttons get accidentally pressed in the heat of the moment.

When I did the NEF import, I had selected "Minimal" previews, which could explain the low resoluiton of the last 2/3rds of the images with Jeffrey's plugin but does not explain the full resolution on the first 1/3 of the images. Any ideas about this?

So, where to go from here? Is there any value in trying Adobe's Preview extraction script? Lacking any better idea, when I get back online with her machine, I may try re-importing with 1:1 previews and then run Jeffrey's plugin to see if that has any affect on those low res previews.

Any other thoughts or suggestons are welcome.

Thanks -- Dan
 
I installed Fast RAWViewer, and it has not problem displaying previews of the NEF images (grid).

Does this SW allow you to save a JPG version of the NEF? I'm not seeing anything obvious in the UI.
 
Yes and no. Here is a link to their program that does extract the embedded jpeg: https://www.fastrawviewer.com/RawPr...ws are extracted,will be extracted from them. . I have not tried this program and I do not know if it is free or not, but it is worth exploring. Also, I just wanted to call out that you can toggle between the raw and jpeg file with the "J" command from the keyboard. You may want to try this first to see what the program can read.

--Ken
 
You have the latest version of Lr.... why not import without converting....

... some thoughts.... maybe you have an old version of the Adobe converter installed... or you may have a link from the task bar to an old version. Also, I see you have Mac and Windows ... so you could have a similar problem re old versions or Taskbar shortcuts.

I sometimes find that after an upgrade the Taskbar buttons still link to the old version....
 
@Gnits :
1) When importing to LrC, not converting at all. Same problem if I import from memory card with "Copy", and if I copy NEF's to folder with Finder and import from folder using "Add".

2) Downloaded new Adobe DNG converter from Adobe website yesterday and verified version when running.

3) Client has the Mac, I have Windows. Not using saved shortcut icons on taskbar/launch bar in either case.

Thanks for thinking about it.
 
On her mac, when we try to open one of these NEF's by double clicking on it in Finder, it opens the file in something called "Preview" but only the top half of the image is displayed and there is only black where the bottom half should be.
Dan, these just sound like straightforward corrupted files?
 
There was a problem several years ago with LrC importing NEF files after they had been processed by Nikon Software. If this relates to your situation, this link may help.
 
Thanks for the tip, but Nikon SW was not in the loop.

What's hard to deduce is where did the corruption get introduced?
  • The same thing happened to many images from the same shoot so probably not a bad sector on the card
  • The problem occures when viewing outside of LrC, so not an LrC issue
  • Could be the card reader or cable but odd that it ffects many images in exactly the same way. bad cable or reader usually doesn't misbehave so uniformially
  • So, we're left with the camera itself as hard as that is to accept.
I just had a thought that perhaps they formatted the memory card into a format that turncates large files? I'll have to check on that.
 
Thanks for the tip, but Nikon SW was not in the loop.

What's hard to deduce is where did the corruption get introduced?
  • The same thing happened to many images from the same shoot so probably not a bad sector on the card
  • The problem occures when viewing outside of LrC, so not an LrC issue
  • Could be the card reader or cable but odd that it ffects many images in exactly the same way. bad cable or reader usually doesn't misbehave so uniformially
  • So, we're left with the camera itself as hard as that is to accept.
I just had a thought that perhaps they formatted the memory card into a format that turncates large files? I'll have to check on that.
Could possibly be the card, more so if writing and deleting were done to it on the PC.

--Ken
 
I would bet on the card failing. SD cards are very unreliable, probably the worst of all the generations of memory cards. Hence I will only use a camera with 2 memory card slots and set the second slot as backup so I get 2 copies of every shot. The only brands that have never failed for me are Samsung and PNY though I don't have any modern PNY cards. My old SanDisk cards never failed but all newer ones failed after the Western Digital takeover. I can still use a 10 year old SanDisk card in my Fuji X-T3.
 
This is a long standing Nikon issue although it has never happened to me. https://www.dpreview.com/forums/thread/3775509.

I think it can happen if you remove/replace the battery before the camera can complete the EOF process. Also, off brand camera cards seem to be more susceptible to this problem.


Sent from my iPad using Tapatalk
 
Status
Not open for further replies.
Back
Top