What causes 'Unexpected end-of-file' error?

Hi,
I am a photographer and an avid Lightroom user. I have two camera's (Nikon D700 and D300) and two computers, a desktop PC and a MacbookPro. Lightroom is installed on both computers.
For the last three photoshoots I have had this problem where 1 in 3 to 1 in 5 images in Lightroom on my desktop PC suddenly gives a 'Unexpected end-of-file' error. First I thought it was my camera. But then I loaded the images onto my MacbookPro and they worked fine. Then I took some images with my other camera, loaded them on to my Desktop PC, and, voila, same problem.
The problem specified: the image stops rendering a preview. A dull preview appears. At the top of the screen the message appears: "An unexpected end-of-file occurred." The histogram window stays empty and the image can not be developed.
I have browsed through this forum some looking for the cause and the fix. There are some mentions of it, but they all date back to 2007.
I run LR 2.2 on Windows XP SP2 and on a MacbookPro with OS X, version 10.5.8.
Please help me understand the cause of this problem, and help me find a fix?
Thanks,
Rogier
Rotterdam, The Netherlands
www.rogierbos.com

While the corruption in your .NEF file could come from any one of a number of sources, here is a way to recover at least some of the information if you own Adobe Acrobat.  Your .NEF file should contain a smaller JPEG file created by your Nikon camera when the picture was taken.  Even if the .NEF file is corrupt, the JPEG may well be intact, and you can tell that's the case if a preview is visible in Lightroom or Bridge. 
If you try to print it from Bridge or Lightroom, though, you will get an error.  You can get around this by loading up a CODEC that will let you preview the files in Windows Photo Gallery.  Nikon has one available for download to use with Vista x32 at http://www.nikonimglib.com/nefcodec/index.html.en, but it doesn't support Vista x64, so if you're running that (as I am) you'll need a second party CODEC such as the one available from http://www.ardfry.com/Products.htm with a 15-day trial download available.  They also have a DNG CODEC which I have not tried.
With that CODEC installed and your system rebooted, preview the damaged NEF file in Windows Photo Gallery.  Choose the "Print" option and select the "Adobe PDF" printer.  Choose the "Postscript Custom Paper Size" option, and set the dpi resolution to the highest available (4000).
Go to the "Options" link on the bottom right of the window and uncheck the "Sharpen For Printing" box, as you can do this yourself with later processing.  Then go to the "Printer Properties" link to see the Adobe PDF settings.
Go to the Adobe PDF Settings tab and choose Default Settings: High Quality Print, which will set the resolution to 2400 dpi. 
You want to have Acrobat interfere as little as possible with the output, so select "Edit" from the Default Settings tab, which will bring up the "High Quality Print - Adobe PDF Settings" dialog.  Here, turn off the "Optimize for fast web view" check box, then go to the "Images" folder and set the "Downsample" setting to Off and the pixels per inch to 2400.  Also, set "Compression" to Off.
If you're going to do this in the future, you can also "Save As ..." your settings for future use with a name like "Fix Bad NEF Files."
Print the file to a designated folder.  It won't be quite as good as the NEF file would have been, but at least you haven't lost the shot.

Similar Messages

  • There was an unexpected end of file error

    I am currently using DNG Converter 8.1 and converting NEF files from a Nikon D600.
    Occacionally I get an error message on some of the files. 
    "The was an unexpected end of file error"  It only happens on some of the ffiles but I can not figure out what is wrong or how to fix the problem.

    plasticAnimal wrote:
    my solution to the problem was to re-copy the problem files from the card.
    Consider checking your disk drive, or just getting a new one.
    If known good (on disk) files go bad, problem is usually disk (or ram).
    If files known to be good on card, are bad after transfer, problem is usually with the transfer hardware.
    If files bad on card, problem is usually camera or card, but may be reader...
    Problem is not likely due to DNG Converter software (nor OS) - sorry Jeff if not worded strongly enough for you.
    R

  • Unexpected End of File error in LR 1.3

    Using the computer's built-in SD card reader, I imported NEF files taken on my Nikon D80. The previews showed up in the Library window of LR, but when I tried to open the files in Loupe view, I received an "Unexpected End of File" error on most of the images.
    Thinking it might be a card issue, I took some test shots using JPG format instead of NEF, and all images imported and opened properly.
    I then took some other photos in NEF format, imported them thru the card reader, and none of the new files would open in loupe view. I deleted all the files from the computer and library, and tried the following.
    I then hooked the camera directly to the computer's USB port and imported the problem NEF files from the camera (SD card in the camera). Everything worked fine -- all the NEF files opened properly.
    Not being a technical type, I don't know if this is a software or hardware issue -- does anybody have a clue?
    I have used this card before and have used the card reader to inport RAW files from a different camera (Panasonic LUMIX) with no problem.
    I hesitate to use RAW format on my Nikon D80 until I can figure out what the problem is.

    I believe the problem is related to Edit > Catalog Settings... > Metadata > EXIF > Write date or time changes into proprietary raw files.  If this is selected and you change the capture time on your images then around 1 in 256 photos will become corrupted.  The problem is one in 256 files will end with character 26 (or character 1A in Hex).  When updating the files Lightroom removes the trailing character 26.  First of all turn off this switch.  Secondly if you don't have a good original copy you can download and use HEdit to append the trailing character 26 to your file. 
    I first posted this problem in September 2007 on the forum.  It is still an issue in the 3.2 RC.  I have reported the bug through adobe labs (correct channel rather than this forum) and they are looking into the problem.
    http://forums.adobe.com/message/1399193#1399193

  • HELP! 'unexpected end of file' error-Is there a fix?! OS 10.4.11

    Getting 'Unexpected end of file' error when trying to open a file (that's a rush job) in QuarkXpress 6.5.  I attributed it to lack of memory, so I immediately backed up all files and HD to an external drive to free up space. Restarted and prayed... Quark launched, but file won't open. Same error.
    Have: 2.1 GHz PPC G5, 1.5 GB DDR2 SDRAM  OS 10.4.11 (pre Intel)
    Capacity: 232.8GB, Available: 163GB, Used 69.6GB
    Have been searching help site for 5 hours looking for answer and am DESPERATE!  I saved changes regularly, but can't access this file at all... I've lost 2 full days & nights working on this project that has to be done in 2 days.
    Ran Disk Utility, but no success opening this specific Quark file (Quark will launch- it's just this file that's affected).  Have tried to down load Applejack, etc. but keep finding out they only support OS 10.5 or higher.  (Haven't been able to afford upgraded system since Intel requires purchase of full verions of graphics software instead of upgrades to the tune of $6k).
    PLEASE, I only know enough to be dangerous, so ANY help is GREATLY APPRECIATED! 
    Savvy folks- if I'm in the wrong place, please send me a link where I can solve this personal catastrophy.
    Many thanks-in-advance

    I think you best do over your work from scratch.  You need to make backup copies of the files regularly.  You need to have copies on multiple disks or flash drives.
    I saved changes regularly
    You should know that this isn't sufficient. You need to have multiplte copies of the file.  Backup anyone?  Could be the file structure got messed up.  Could be Quark messed up the file.
    You need to get a newer machine.  G5's are not reliable any more.  Need to see if Quark will run in compatiblity mode on an intel machine.  You should at least get an external firewire drive from owc.  Old hd's are not reliable.
    Boot in safe mode. Hold down the shift key when powering on the machine. This will run a disk repair program. Boot up will take longer as the harddrive is scanned and repaired.
    See this article:
    http://docs.info.apple.com/article.html?artnum=107393
    Or from:
        mrtotes article  :
        Boot from the OS X Install disk and from the Menu Bar choose Disk Utility. Then run "Repair Disk" and "Repair Disk Permissions" on your hard disk.
        a brody:
        https://discussions.apple.com/docs/DOC-1689
    Here the apple article on booting single user mode and using fsck. See the section on Use fsck:
    http://docs.info.apple.com/article.html?artnum=106214
    I suspect not but Perhaps Disk Warrior will be of some help:
    http://www.alsoft.com/DiskWarrior/
    Robert

  • How to resolve Unexpected End of file error in Web Crawling

    how to resolve Unexpected End of file error in Web Crawling....
    I am getting java.net.SocketException :Unexpected End of file error in Web Crawling.
    How to get rid of this error.
    Please help anybody ASAP.

    1. Handle this exception - not recommended since you will be creating an exception handling overhead unnecessarily.
    2. Check for EOF using available() method in InputStream. It returns 0 if there are no bytes to read.

  • Oraclejsp unexpected end of file error

    I am getting an OracleJsp Unexpected End of File error when I use the <logic:present name="add"> <html:form action="myAction" /> </logic:present> tag. "add" is referring to something that was set in a struts action (ie: request.setAttribute("add", "present")). I've even tried a scriplet that checks request.setAttribute and I get the same error. Any ideas? Thanks.

    Often, file headers get smurfed. Photoshop is very critical of these headers.
    JPEG's seem to be very sensitive to these errors. My trick is to open in a more liberal program, like ThumbsPlus, IrfanView, or PhotoImpact, and then just do a Save, keeping the JPEG compression levels low. This nearly always clears things up for PS.
    Good luck,
    Hunt

  • Unexpected End of File Error

    I am getting a Could not open due to unexpected end of file error messages on a bunch of jpg's I am receiving via email. The files open in Microsoft Office Picture Manager.

    Often, file headers get smurfed. Photoshop is very critical of these headers.
    JPEG's seem to be very sensitive to these errors. My trick is to open in a more liberal program, like ThumbsPlus, IrfanView, or PhotoImpact, and then just do a Save, keeping the JPEG compression levels low. This nearly always clears things up for PS.
    Good luck,
    Hunt

  • Unexpected end of file error on CS4, can I fix this or is the file lost?

    I'm trying to open a Photoshop CS4 file, but it keeps giving me an error message saying "Could not complete your request because an unexpected end-of-file was encountered." A lot of hours went into this project. Can I fix this or is the file lost?

    Oh man, I've been getting that too (with CS5). Unless I move my file off my computer at end-of-day, I show up and get this error. I'll be eager to see what an expert says… and sorry I can't help you out!

  • CS5.1 Camera Raw Unexpected end of file error

    I ran into this error a couple of times (the problem would not resolve for these few affected photos) when editing my raw files in my CS5.1 trial. 
    "Could not complete your request because an unexpected end-of-file was encountered."
    I could not get around opening these particular raw files and have come to the theory that these files are corrupted due to the limitations in SD card write speeds. I never had this problem on my D80 when working in CS4 or CS5, but then again the D80 doesnt shoot 20Mb raw files. My D7000 shoots continuous 6fps I'm shooting large, fine JPEG + RAW which pumps out around 25 Mb per photo.  At 6fps this is somewhere around 150 Mb/s... My SD Card is a Sandisk 8gb extreme class 6 which has a rated write speed of 22Mb/s but its been a while since I've seen the documented number.
    I took one of these raw files and opened it with Photomatix 3 (HDR Software) to create a Psuedo HDR file. The product was obviously corrupted.
    Anyone care to comment on other culprits and solutions?
    Cheers,
    Alex

    Files DO get corrupted, often by flash memory errors, sometimes by transfer problems.  Revisit all the steps in your process and maybe try transferring the files to your computer differently (e.g., use a flash card reader instead of the camera cable and see if there's a difference in the files).
    One thing that almost universally ISN'T necessary to worry about is that your flash memory could be corrupted if you take photos too quickly.  CF write speed bottlenecks are dealt with properly by all the camera makers, generally by slowing down the picture-taking process when the camera's RAM buffers fill.  You DO have to remember not to cut power to the camera while it is still writing to the flash memory, however, which can take some time after you finish shooting.
    You should reformat your flash card in your camera, and personally I would treat that particular card as suspect until you prove that it can be filled and every image is complete and uncorrupted.  You might even want to fill it with "junk" shots just to test it.
    -Noel

  • "unexpected end of file" error on files after import.

    recently i have been getting errors on import to lightroom,  some times its colored dots or lines,  some times the image looks fine but shows "unexpected end of file" or "lightroom has encountered an error reading file".
    I have been trying to rule things out like cards by switching camera cards ect.   If the file comes up bad i will delete it from disk and re-insert the sd card find the file and drag it to the folder on my drive and re import.   so far this fixes it every time proving the the camera and card are fine, somewhere in the import process its going bad.  
    any suggestions on some more troubleshooting.?
    System specs
    MBP 2.2ghz i7 (2011)
    16g ram ( aftermarket )
    250gb sdd (brand unknown)  with lightroom and catalog +previews (17121 files)
    750gb storage in optical bay,  (nothing ligthroom related in there)
    files are on a 4tb lacie ThunderBolt raid  ( new this week , was using drobo replaced as part of my troubleshooting i thought it was the corruption problem.)
    Lightroom version: 5.2 [922700]
    Version: 10.7 [5]
    Application architecture: x64
    Logical processor count: 8
    Processor speed: 2.2 GHz
    Built-in memory: 16384.0 MB
    Real memory available to Lightroom: 16384.0 MB
    Real memory used by Lightroom: 1379.8 MB (8.4%)
    Virtual memory used by Lightroom: 1681.8 MB
    Memory cache size: 1861.7 MB
    Maximum thread count used by Camera Raw: 4
    Displays: 1) 1920x1080

    i will try to usb the camera and import that way next time for a few files to try that.  (never tired it on a mac)  will also look this week for an external reader.   If my macbook sd reader turns out to be flakey and was the issue the whole time im going to be very anoyed.   I just bought a new lacie raid thunderbolt drive.

  • Found Fix for "unexpected-end-of-file" error for Photoshop

    NOTE:
    You will lose all layers (this process flattens the image, but it's better than nothing).
    You need to have Adobe Illustrator installed (you could get a trial version or something if you don't have it).
    I was using Windows 7 when I did this, so it may not work in OSX (Apple) or Windows 8.
             1. Right click on the corrupt document and open it in Illustrator. (Mine took a while so you may have to wait)
             2. Save the file as a .pdf
             3. Right click on the .pdf and open it in Photoshop.
    Sorry, I know i started a discussion but I can't figure out how to answer a post.

    Hi Oliverchuckle
    I tried this on my first encounter of the error and it works pretty good for simple PSD files but not on complex ones containing vector masks etc. And it will not work on larger PSD files that are more damaged and "unreadable".
    There are many things that can cause this - all related primarily to the state of the network or hard drive the file is being saved to.
    To avoid:
    work off your local machine hard drive (not a network drive)
    ensure that you have ample (scratch) disk space (at least 20% free)
    create multiple versions of your files with save as. You can always trash the ones you don't want when you're done.
    Recovery depends on how far the save function got before photoshop (or your computer) crashed. In many cases only the file header information is damaged. For larger files the damage can be more extensive.
    In all cases, the best recovery method is to open the file with Adobe Image Ready and save as. It may give a "file is unreadable" error while opening but usually manages to still open the file. In my testing, the results are 100% accurate (to whatever state the file existed in). In most cases the file was 100% recovered, including complex files containing vector and layer masks, clippings and groups. I cannot say this is the case for any of the paid for "repair PSD" utilities which extract a raster only version of each layer and then re-build the layers into a new psd file. This results in a limited, "destructive" or rasterized layered file.
    Unfortunately, Adobe Image Ready is hard to find. The last version I believe was V9 (“CS2″), May 2005.
    Adobe is offering a legacy download here:
    https://helpx.adobe.com/creative-suite/kb/cs2-product-downloads.html#
    for users who previously purchased it (and need to re-install it). I didn't try this as I still have CS2 already installed on an older machine. Note, you will need MacOS 10.6.8 running rosetta or older to instal on a Mac.
    Hope this helps!

  • Unexpected End of File error message

    I remember getting this error message a couple of years ago, but I don't remember how to fix it. I get it whenever I try to launch the Palm Desktop. The only option I get is to quit the program so I can't access my user data.
    Thanks.
    Seth
    Post relates to: Zire

    Hello!
    Either the PIM data is corrupt on the MAC or the Application needs to be reinstalled.  First thing to try is setting the Calendar, Contacts, Tasks, Notes, Memos conduits to Handheld Overwrites Macintosh and rehotsync.  This will purge the PIM data from the Mac and replace it with the data on the handheld.  Since you cannot access these conduits from PDT since it keeps crashing out, open Hard Drive -> Applications Folder -> Palm Folder -> and then open Hotsync Manager application.  From there open the Hotsync menu and select conduit settings.  This is were you can adjust the 5 PIM conduits
    Another way is to remove the User Data file and see if PDT opens fine then.  To check this, open the Hard Drive -> Doccuments -> Palm -> Users -> Folder with your hotsync name.  From there, take the User Data file and move it to the desktop and then see if PDT opens.  If it does, set the 5 pim conduits to Handheld Overwrites Macintosh before the next sync to properly restore PIM data from the handheld back to the Mac.
    Try these first, if nogo then clean reinstall of PDT needs to be done.  Keep me posted. 
    Post relates to: Treo 650 (Unlocked GSM)

  • I am getting a photoshop error could not load photoshop because the preferences file was invalid and cln't load actions because of an unexpected end of file encountered.

    I am getting a photoshop error could not load photoshop because the preferences file was invalid and cln't load actions because of an unexpected end of file encountered.

    Are you trying to open Photoshop directly, or open it by double clicking on a Photoshop document, like a PSD file?  If the former, then you might need to reinstall.  Resetting Preferences would be the firs step, but I am not sure if that will work if Photoshop is not opening in the first place.
    Try doing so anyway.  Hold down Shift Alt Ctrl (Shift Opt Cmd) while opening Photoshop. OK the message to delete Preferences.
    If you get the unexpected end of file error while trying to open Photoshop via a PSD document, then there is more than a good chance that that file is toast.
    If still stuck, we need to know Operating System, and Photoshop version.

  • Any solution for "unexpected end-of-file encountered"?

    Using Mac 10.7.4 and CS5 Extended on an Imac 27.
    Today, working on a large file PSD suffix and Photoshop froze. and when I restarted i got "unexpected end of file " error message on the file i was working on, but on several other files also in that folder.
    Has anyone found a solution to this? Can you rebuild or restore the file in any way?
    The file shows on the hard drive now as 118.6 megs.
    The files show up in Bridge, but with small Previews.

    [email protected] wrote:
    Can you rebuild or restore the file in any way?
    It doesn't help you with this file, but unexpected failure is precisely what the new Photoshop CS6 Auto-Save feature helps with.  If Photoshop were to crash/freeze/be forced closed/whatever, next time you start it it brings back whatever you were working on in the last few minutes before the failure.
    -Noel

  • Major problem with Photoshop unexpected end of file...

    Every time I save a file in Photoshop, I have to save it twice per format (psd, jpg, etc...).  That's because if I've ever saved the file before, I get an unexpected end of file error and the file disappears until I do a save as.  I downloaded the latest update today and it claimed to have fixed major errors with Photoshop.  I wonder what major errors exactly were fixed; and why not this one?  As far as errors go, it's pretty effing major.  It adds significant time to all of my projects and frankly, if I'm spending exorbitant amounts of money for "industry-leading" software, I expect to be able to save my work painlessly.  Oh well, I guess it'll only be another couple months before I have to shell out another $1200 bucks for the CS6 right?  Maybe then I'll be able to actually save my work.
    p.s. CS2/3/4 did not have this issue - sweet upgrade Adobe, thanks.

    Again, this is not a known issue.   You are the first person to bring this up without a bad disk drive, and it is probably due to something on your file server.
    Yes, other people get the same error message - because they are dealing with corrupt files for one reason or another.  You are getting the message because the files are corrupt, probably because of an issue with your file server.
    Photoshop CS4 and earlier used the Carbon framework on MacOS.  Photoshop CS5 is written to the Cocoa framework/APIs and uses different OS code paths for many things.  We have seen many cases where the Cocoa APIs had problems that the Carbon APIs did not.  Unfortunately, if we cannot work around those API issues, then they are up to Apple to fix.
    But in this case, I doubt it is an OS API bug as such.  I suspect it is a change in the way the OS APIs interact with the file server.
    And cases like this are high up on the list of why we say NOT to open or save from a file server -- you can get a lot of odd, difficult to diagnose errors because of problems on the server or network.  Those problems have nothing to do with the application, but may appear to because of the complexity of file servers and networking.
    Some Photoshop users do open and save off a file server all the time - without problems.  When we test with file servers here inside Adobe, we rarely have problems (and the rare problem was due to a bad disk on the server).  But we can't guarantee that everyone's network and everyone's file server is going to work perfectly - and evidence suggests that many of them don't work perfectly.
    In short: you probably have a bad file server.  It is highly unlikely that this is a bug in Photoshop.

Maybe you are looking for

  • How do I stop the autoload on QT .mov files on a webpage?

    I've read through http://www.apple.com/quicktime/tutorials/embed2.html already, and here is my code: <OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width="225" height="191" codebase='http://www.apple.com/qtactivex/qtplugin.cab'> <param

  • HELP! How to I disable SkyDrive on a Mac/Maverick!!!

    I am being prompted ever day to continue to upload amassing file. I can't get it out of my dock. It constantly reloads. Mac has indicated that it may be causing crashes to my computer. What are you people thinking?? I don't want. Why did you ram it i

  • Converter not finding CR2 files from Canon 5D III

    I installed v7.1 of the dng converter to convert CR2 files from a new Canon 5D Mark III for use in Lightroom 3.6.  However, the program does not recognize the CR2 files whether in the original folder on the camera memory card or transferred to a fold

  • Dying G4 iBook

    Hi folks, I'm at a loose end. My g4's just over a year old now and yesterday when I opened the lid from sleep mode it wouldn't recover. (Over the last week, it has started crashing occasionally, but never this bad...) Upon removing the battery to reb

  • Is it possible to place a native button in popup messages?

    Hi Experts,                    I have a requirement of sending the control back to driver application for my ADLC form after user has entered a sting of more than 105 characters in a text field. Since certain complex processing needs to be done and j