• 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.
  • The August 2019 Lightroom updates are now available. Lightroom Classic includes advanced GPU support, batch HDR/pano merge and more. Lightroom (cloud-based service) has deleted photos on the desktop/mobile apps, as well as video support and batch metadata editing on Android. The Missing FAQ and Edit Like a Pro eBooks are already updated for the changes.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom 6 questions. All the information you need is in Adobe Lightroom 6 - The Missing FAQ!

    To help you 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. When you upgrade to subscription, there's also a Lightroom Classic version available.

"an unexpected end-of-file occurred" error message / correcting using Hexplorer

Birdbrain186

New Member
Joined
Apr 4, 2018
Messages
20
Location
Birmingham UK
Lightroom Experience
Intermediate
Lightroom Version
6.x / CC 2015.x
Lightroom Version
Lightroom version: 6.14 [ 1149743 ]
Operating System
Windows 10
I am occasionally getting the exclamation mark at top right of a few RAW thumbnails in Library mode (of LR 6.14), which leads to the message "Lightroom has encountered problems reading this photo - you will not be able to make adjustments to this photo."

If I try to open such files in Develop mode I then get the message "an unexpected end-of-file occurred" and indeed I am unable to open the file to make any adjustments, neither can I zoom into the preview image using Navigator.

Looking at a few Internet postings (outside this forum) suggests this occurs when the file has been corrupted during the Import process. A particular posting details a case where the person also had both a corrupted and an uncorrupted version of the same photo and by using "Hexplorer" software he established that the file had been truncated by just the final byte, and by using this software was able to "repair" the file which thereafter was editable in the normal way.

Please see following page for the full text of that posting:- -https://feedback.photoshop.com/photoshop_family/topics/_unexpected_end_of_file

I have downloaded the Hexplorer software but am struggling to understand how to make the necessary adjustment as detailed by the writer to "append 1A" to add back the missing file information.
I've been able to open the files in Hexplorer and get the two panel view displaying including the Hexadecimal view of the file data. I then have navigated with the cursor (highlighted in red) down to the bottom of that column presumably to the position of the "missing byte" ( Text at bottom of the boxes shows:- "Overwrite" & "Pos: 17a20ebh (24,781,035)" & "Byte: 0" & "Size: 24,781,035 bytes" & "Original")
So far so good but I'm then unclear how I'm supposed to enter the text "1A". I've tried using copy & paste - ie I copied the text (1A) and then tried to paste it by using (edit / paste external text / as hex numbers) - but all that happens is the red highlighted cursor moves one byte to the left and bottom text now shows:- ("Overwrite" & "Pos: 17a20eah (24,781,034)" & "Selection: 0 bytes0" & " Size: 24,781,035 bytes" & " Not saved") When I try to close the window I get a "save" option, which I've then selected but the photo still shows the black exclamation mark in Library mode and remains uneditable. (and reads exactly the same as before when reopening it in Hexplorer)

So evidently the process hasn't worked for me. However I only have however a very limited understanding of what I'm trying to do here and don't even know if the process should work with RAW files (Canon) anyway as the posting related rather to .nef (Nikon) and . arw (Sony) files, but I'm assuming a similar principle would apply to my RAW files, so perhaps I'm just not understanding sufficiently or carrying out the process correctly.

I'd be grateful therefore if anyone who has any greater understanding of using hexadecimal editors can clarify whether this process is likely to work for the problem I'm having and if so perhaps can also tell me where I'm going wrong.


Many thanks

Mike
 
Last edited:

Birdbrain186

New Member
Joined
Apr 4, 2018
Messages
20
Location
Birmingham UK
Lightroom Experience
Intermediate
Lightroom Version
6.x / CC 2015.x
I'm wondering if this is any sort of a record - not having had a single response to a posting after 8 days?!!!!. :(

I guess it is a little outside the normal scope of working with Lightroom, but am surprised if no-one else has at least come across the same error message.:rolleyes:

Oh well it's not a major problem - although it does mean I am unable to process the RAW files whenever this error occurs.

And so all I can do is make a screen print of the RAW image at full screen size, and save that as a .JPG file, which means I then end up with an approx. 1800x1200 .jpg instead of the usual 4896x3264 .jpg, and of course there is no EXIF data within the saved .jpg file.

Hope this is at least of some help to anyone else who gets the same error message in the future.

Mike
 
Last edited:
Joined
May 12, 2011
Messages
2,983
Location
Canada
Lightroom Experience
Advanced
Lightroom Version
Classic 8
Mike,
Probably none of us uses that hex editor. You need to figure out (probably by reading its help file) how to add data to the file, rather than just modify the data that's there.

That said, there's no guarantee that only one byte is missing at the end of the image file. What you really need to do is to figure out what part of your hardware is causing the problem and replace it. There's something wrong there, and until you fix it, you'll continue to get raw files that are damaged.
 
Joined
Nov 16, 2015
Messages
1,724
Location
California, USA
Lightroom Experience
Intermediate
Lightroom Version
Classic 8
Mike,
Probably none of us uses that hex editor. You need to figure out (probably by reading its help file) how to add data to the file, rather than just modify the data that's there.

That said, there's no guarantee that only one byte is missing at the end of the image file. What you really need to do is to figure out what part of your hardware is causing the problem and replace it. There's something wrong there, and until you fix it, you'll continue to get raw files that are damaged.
Hal,

I agree with this comment. Mike does need to identify the failing hardware. However, twice now I have had a group of photos that could not be imported. I assume that the NEFs were somehow damaged. Since these problems occurred years apart and years ago, I am assuming that the problems were probably caused by operator error. However, I still have the task of trying to repair these files, and Mike's post gave me a way to possibly recover these NEFs.

Phil Burton
 

Birdbrain186

New Member
Joined
Apr 4, 2018
Messages
20
Location
Birmingham UK
Lightroom Experience
Intermediate
Lightroom Version
6.x / CC 2015.x
Thanks to Hal & Phil for your feedback.

I suspect that a particular CF card might be the faulty element. So, as and if this error recurs, as per Hal 's suggestion I will endeavour to narrow down where the fault lies, to enable me to remove the faulty item from my workflow.

I may also delve into the Hexplorer help screen to see if I can make any more sense of the program - I was really just hoping someone on the forum might have had prior knowledge of such programs to steer me in the right direction as it seems to be a little "over my head"!

Glad to hear my posting might be of some assistance with your problem Phil.

Mike
 
Top