Jump to content

Welcome to NikonForums.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

"unexpected end of file"


  • Please log in to reply
13 replies to this topic

#1
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

Hi. I'm not sure that it is suitable for my question part of forum, but I didn' find anything better. So I have a corrupted nef file. Lightroom writes "unexpected end of file". Few years ago I fixed it some way and when it became workable I make it's copy on another drive. Now the same problem appearce again. Do you have some advices for me? How can I fix "unexpected end of file"? Thanx.



#2
Adam

Adam

    Nikon Forums Staff

  • Administrators
  • 1,335 posts
  • Country Flag

Hi. I'm not sure that it is suitable for my question part of forum, but I didn' find anything better. So I have a corrupted nef file. Lightroom writes "unexpected end of file". Few years ago I fixed it some way and when it became workable I make it's copy on another drive. Now the same problem appearce again. Do you have some advices for me? How can I fix "unexpected end of file"? Thanx.

This implies that the entire file wasn't copied over to your computer.  Do you still have it on your SD/CF card?



#3
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

File is very old. Card was rewritten many times. And I forgot to add that file was fully workable when I just copied it on computer. The problem appeared after few years. And during enough long time I often use this file without any problems. I even make a few different jpg from this file. So I don't think that problem is in copying on computer.



#4
Adam

Adam

    Nikon Forums Staff

  • Administrators
  • 1,335 posts
  • Country Flag

It's hard to say, but it must have gotten corrupted somehow.  That's why keeping backups is a good idea :)



#5
Afterimage

Afterimage

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 615 posts
  • Country Flag
  • LocationPennsylvania

You know I had Photoshop flake out on me like this a few times before. It was a file I absolutely needed... I could open it in Windows Preview so I knew it was OK, for some reason PS thought it was broken. I fixed it by opening the file in a different program, changed NOTHING, and saved at full resolution with a different name... Photoshop was totally cool with it and opened it right up like nothing was wrong.

 

I suspect there's a tiny bug in the Adobe software where some little piece of the files code makes it think it's broken.



#6
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

Realy strange. I tryed to follow the last advice, but I just copied and rename file. It became fully workable. Thank you for a good advice. If somebody knows what is wrong with please write it here.



#7
Warrick

Warrick

    Active Member

  • Forum Member
  • PipPipPipPip
  • 73 posts
  • Country Flag
  • LocationMelbourne, Australia

Could be a few things...

 

1. Program may be intermittently corrupt? try a reinstall,

2. Hard Drive may be on its way out bad sectors etc

3. Memory card could be on its way out, try formatting it when you go to use it again

 

Seems more hardware related to me when this stuff starts to play you around make sure you have backups incase the worst case scenario (hardware failure) occurs



#8
Afterimage

Afterimage

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 615 posts
  • Country Flag
  • LocationPennsylvania

Good deal, glad that worked for ya!



#9
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

I'm glad too)). But I still want to know the reasons of this problem to predict such problems in future.



#10
Afterimage

Afterimage

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 615 posts
  • Country Flag
  • LocationPennsylvania

I still think it's a minor bug with the program. It's so rare and random I might not see it pop up again this year.... or it might happen tonight. At least we have a work-around :)



#11
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

Afterimage, do you know how to fix?



#12
Afterimage

Afterimage

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 615 posts
  • Country Flag
  • LocationPennsylvania

Sorry, I don't know how to prevent it from happening but the work-around to repair files is quick and easy.



#13
Merco_61

Merco_61

    Nikonian

  • Premium Member
  • PipPipPipPipPipPipPipPip
  • 10,635 posts
  • Country Flag
  • LocationUppsala, Sweden

Site Supporter

Adobe software are notoriously finicky with the file headers, so if you have a file that has been written a few times to disk and fragmented so the byte order isn't read easily it can be identified as damaged. Other software can then read it and save it correctly. Sometimes a defrag of the disk solves the problem.

Sometimes you get the same message when importing from a memory card that has not been formatted in camera. It can often be solved by opening in ViewNX and saved to disk.



#14
Stas

Stas

    Forum Veteran

  • Forum Member
  • PipPipPipPipPipPipPip
  • 436 posts
  • Country Flag

Thank you for answer. Today I will try to defrag my hdd. Let see what I will get.