iPhoto is Corrupting My Photos and Videos

Hi everyone. As the title says, iPhoto has been corrupting many of my photos and videos lately. I have about 6000 photos and videos in the library (mostly photos though), and over the past month about 100 of them became corrupted (they get replaced by the black box surrounded by a white outline).

It seems that most of the corruption occurred right after I let iPhoto rebuild its thumbnail cache. So, after that happened I decided to make iPhoto rebuild everything (I held down Command-Option when opening iPhoto and told it to rebuild small thumbnails, all the photo thumbnails, the library database, and to recover orphaned photos from the iPhoto folder). That was probably a bad idea because after doing that even more photos/videos became corrupted.

Also, it seems to corrupt videos more often than photos. My photos and videos come from either a Canon A80 or A720IS camera, and the videos are in their native format from the camera (AVI).

I can't seem to do anything to get these photos/videos back. Exporting them either exports a 0KB file, or it exports a file of the right size but it can't be opened by anything (I've tried Preview, Quick Look, Quicktime, and VLC so far). And when I go look at the original file in the iPhoto folder same thing happens (either 0KB or can't be opened by anything). When I try copying the file from that folder it says I don't have permission to do this even though I am the admin on my computer.

So, anyone know what's going on? Thanks in advance!

-Eric

 2.0GHz CD MacBook, 2GB ram, 120GB HD, white, Mac OS X (10.5.3), 30GB iPod video gen 5.0, XP Pro with Bootcamp

Posted on Jun 2, 2008 9:28 PM

Reply
11 replies

Jun 9, 2008 11:58 PM in response to macbook7

If that fails then I go to the image file, copy it to somewhere (desktop usually), then drag it into iPhoto. So, I never move or edit anything in the iPhoto folder; I only look at the files or copy them.


This might explain why you're having recurring problems.

iPhoto loses track of the image because of a corrupt or damaged database file. Your response is to recover the file from the Library Folder and then re-import it... and this image is then tracked... in the corrupt database file.

But you're not dealing with the core issue here: the corrupt database file. It keeps losing files and you keep adding them back and it loses files because it's corrupt.

You need a new Library with a new database file:

Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.

Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.

Regards

TD

Jun 2, 2008 11:54 PM in response to macbook7

Eric

It's very unlikely - you'll be glad to hear - that iPhoto is actually damaging your files. What this sounds like is a corrupted database file - that is, the file that tracks the various versions of your pics has been damaged.

Try these in order - from best option on down...

1. Do you have an up-to-date back up? If so, try copy the library6.iphoto file from the back up to the iPhoto Library allowing it to overwrite the damaged file.

2. Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.

3. If neither of these work then you'll need to create and populate a new library.

To create and populate a new library:

Note this will give you a working library with the same Rolls and pictures as before, however, you will lose your albums, keywords, modified versions, books, calendars etc.

Move the iPhoto Library to the desktop

Launch iPhoto. It will ask if you wish to create a new Library. Say Yes.

Go into the iPhoto Library on your desktop and find the Originals folder. From the Originals folder drag the individual Roll Folders to the iPhoto Window and it will recreate them in the new library.

When you're sure all is well you can delete the iPhoto Library on your desktop.

In the future, in addition to your usual back up routine, you might like to make a copy of the library6.iPhoto file whenever you have made changes to the library as protection against database corruption.

Regards

TD

Jun 3, 2008 9:48 AM in response to jonohah

onohah:

Welcome to the Apple Discussions. Did you try Terence's suggested fixes? What might work for one may not for another. So go ahead and try them.



User uploaded file

TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
≤br>
Note: There now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

Jun 3, 2008 8:44 PM in response to Yer_Man

Hi Terence. Thanks for all the help. I did have an up-to-date backup of the library6.iphoto file and tried using that, but that didn't work. Same photos were missing.

I would have tried your other suggestions, but I ended up manually restoring these photos/videos with a backup that I had (probably should have waited for your response before doing that :P).

One question though: if the database file is corrupted then why can't I open the actual image/video files that are in the iPhoto folder from within Finder? If iPhoto isn't open then shouldn't those files be totally unrelated to the DB file?

Also, I should probably mention that I never edit anything in the iPhoto folder cause I know that it'll mess up iPhoto. I do look at or copy the files from that folder every once in a while, but I never move/delete them.

And one other question: why does it seem that so many people have problems with corrupted photos/databases in iPhoto (I see a lot of these problems in the discussions, and it's happened to me lots before)?

Jun 4, 2008 12:49 AM in response to macbook7

One question though: if the database file is corrupted then why can't I open the actual image/video files that are in the iPhoto folder from within Finder? If iPhoto isn't open then shouldn't those files be totally unrelated to the DB file?


Yes you should be able to access the pics via the Finder as they are tracked in the db, but no more. This suggests to me that you have hard disk issues.

I do look at or copy the files from that folder every once in a while, but I never move/delete them.


But why do you access the files via the Finder at all? Every time you do you risk damaging the Library. There are many, many ways to access your files in iPhoto:

For 10.5 users: You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.

User uploaded file
Uploaded with plasq's Skitch!



To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.

This is also true for emailing with Web-based services. If you're using Gmail you can use THIS

If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto. With 10.5 you can access the Library from the New Message Window in Mail:

User uploaded file
Uploaded with plasq's Skitch!




If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.

Or, if you want to access the files with iPhoto not running, then create a Media Browser using Automator (takes about 10 seconds) or use THIS

Other options include:

1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.

2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.

3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.

All of these are faster and safer than rooting through the iPhoto Library Folder.

why does it seem that so many people have problems with corrupted photos/databases in iPhoto (I see a lot of these problems in the discussions, and it's happened to me lots before)?


Some comments on this one:

You cannot judge what's going on with an application by visiting an Internat help site. Only people who have problems come here, all the other ones don't. So it's like going to the Emergency Room of your local hospital on a Saturday night and using what you see there as an assessment of the health of your community.

That said, the db problems are common amongst folks who have issues probably because there really isn't anything else to go wrong with iPhoto. And do you really think that

and it's happened to me lots before


is unrelated to

I do look at or copy the files from that folder every once in a while,


If you're having this issue regularly and you believe that it's not related to you surfing the iPhoto Library Folder, then check your HD for issues. Corruption is caused when the app is interrupted writing to the disk - by crashes, force quits and the like - or when there is disk damage that prevents a successful write out to the disk.

Regards

TD

Jun 8, 2008 8:41 PM in response to Yer_Man

Yes you should be able to access the pics via the Finder as they are tracked in the db, but no more. This suggests to me that you have hard disk issues.


I'm not having any other harddrive-related problems, so I doubt that my disk is having problems, but I will look into that anyways.

But why do you access the files via the Finder at all? Every time you do you risk damaging the Library. There are many, many ways to access your files in iPhoto:


I mostly access them from Finder when manually backing up my HD to DVD (which I don't do very often because it's not my primary backup method), or when trying to recover corrupted iPhoto images. Otherwise I don't go in that folder. But, sounds like I should just stop going into that folder altogether if iPhoto is going to have problems when I merely open the folder. Also, I do know of those other methods of accessing my images; I use them fairly often.

You cannot judge what's going on with an application by visiting an Internat help site. Only people who have problems come here, all the other ones don't. So it's like going to the Emergency Room of your local hospital on a Saturday night and using what you see there as an assessment of the health of your community.


Nice analogy, and yes I see what you mean. But still I find this problem to be too common among myself and friends who use iPhoto. When I first got my new MacBook I was having photo corruption problems right away even though I had never opened the iPhoto folder from within Finder and I hadn't had iPhoto force quit yet at that point. Plus, if iPhoto is too fragile to have me browsing its folders from Finder then the program should have originally been made with a library folder that is either hidden or read-only by the user (which would also be a good way to prevent people from inadvertently deleting/moving stuff in the iPhoto folder, which understandably messes up iPhoto).

Corruption is caused when the app is interrupted writing to the disk - by crashes, force quits and the like - or when there is disk damage that prevents a successful write out to the disk.


iPhoto crashes somewhat often for me (has been doing this since I first got the computer), so that could be the problem. Also, I will verify/repair my disk with Disk Utility. Thanks for the suggestion.

-Eric

Jun 9, 2008 1:18 AM in response to macbook7

Eric

I think you have a significant problem with something, and I really do think that iPhoto is the symptom, not the issue.

I was having photo corruption problems right away even though I had never opened the iPhoto folder from within Finder and I hadn't had iPhoto force quit yet at that point.


and

iPhoto crashes somewhat often for me (has been doing this since I first got the computer),


iPhoto is a mature application and, frankly, mine simply never crashes. I've found it to be robust and hard-wearing. So there's something in there that's causing this issue - a faulty install of the app, a minor glitch in the install of the Operating System because iPhoto should not crash "somewhat often".

Going into the iPhoto Library Folder will not damage your library but making changes there will. I didn't say it would. I said that anytime you go in there you risk damaging the Library.

I mostly access them from Finder when manually backing up my HD to DVD (which I don't do very often because it's not my primary backup method), or when trying to recover corrupted iPhoto images.


Tell me about recovering "corrupt iPhoto images"? Do you go in, drag the pics out and then re-import them to iPhoto?

Regards

TD

Jun 9, 2008 9:16 PM in response to Yer_Man

Hi Terence. I hope you're right about iPhoto not being the problem because, well, if it was then I'd say it's one of the more unreliable programs I've used. If you're wondering, the chronology of my computer/iPhoto is: bought it from Apple.ca (with OSX/iPhoto pre-installed, of course), installed a bigger harddrive about 1.5 years later (did this by cloning my old internal HD to an external one, installing the new HD, then cloning back to the new internal HD), and then upgraded to Leopard soon after (by choosing the archive and install option, so it wasn't a totally fresh install). I haven't re-installed iLife since I got the laptop, and I've installed all the updates since the beginning. So, iPhoto is essentially the same on my computer as it was from the factory, with the addition of all the updates that have come out since then.

Tell me about recovering "corrupt iPhoto images"? Do you go in, drag the pics out and then re-import them to iPhoto?


When I find corrupt images in iPhoto (black boxes with white dashes around it), what I usually do is first try rebuilding the thumbnail caches and the iPhoto database. If that doesn't work then I try exporting those corrupt photos using iPhoto's photo export feature. If that fails then I go to the image file, copy it to somewhere (desktop usually), then drag it into iPhoto. So, I never move or edit anything in the iPhoto folder; I only look at the files or copy them.

-Eric

Jun 10, 2008 9:08 PM in response to Yer_Man

Thanks for all the help Terence. I'll try iPhoto Library Manager when I get the chance.

Also, I'll give your the 10 points for solving my problem, but first I was hoping someone could answer another question I had asked earlier: is there any systematic way to find all the missing/corrupt images in iPhoto rather than having to manually check through the whole library for images that have been replaced by black boxes with white outlines?

-Eric

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iPhoto is Corrupting My Photos and Videos

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.