• 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.
  • Dark mode now has a single preference for the whole site! It's a simple toggle switch in the bottom right-hand corner of any page. As it uses a cookie to store your preference, you may need to dismiss the cookie banner before you can see it. Any problems, please let us know!

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

Status
Not open for further replies.

Birdbrain186

Member
Joined
Apr 4, 2018
Messages
41
Location
Birmingham UK
Lightroom Experience
Intermediate
Lightroom Version
6.x
Lightroom Version Number
Lightroom version: 6.14 [ 1149743 ]
Operating System
  1. 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:
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:
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.
 
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
 
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
 
Status
Not open for further replies.
Back
Top