3 Replies Latest reply: Feb 7, 2013 8:54 AM by Old Toad
tessfrmct Level 1 Level 1 (0 points)

imported photos from iPhone 5 today into iPhoto.  Was able to view and edit OK then at one point it froze and had to close it.  When I tried opening iPhoto again I got a message that library was corrupted or unreadable.  Performed iPhoto first aid and got the same message for all choices except for the rebuild.  Did a rebuild of the library and all photos appeared in iPhoto as before.  BUT, when I closed iPhoto and reopened it I got the same error message.  Why does iPhoto do a proper rebuild but then becomes corrupt again when you re-open it?

 

I have an older back-up of iPhoto library (from a few months ago).  I made a backup today, but suspect that library may be corrupted because when I restored it, I had the same issue.  I haven't tried restoring the older library yet as I was wondering if there was a way to keep the rebuilt library rather than restoring an older version. 


Mac Pro, OS X Mountain Lion (10.8.2), iPhoto
  • Old Toad Level 10 Level 10 (130,275 points)

    Try the following:

     

    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your

         User/Home/Library/ Preferences folder.

     

    2 - delete iPhoto's cache file, Cache.db, that is located in your

    User/Home/Library/Caches/com.apple.iPhoto folder (Snow Leopard and Earlier).

    home.PNG

    or with Mt. Lion from the User/Library/Containers/com.apple.iPhoto/
    Data/Library/Caches/com.apple.iPhoto
    folder

     

    iP11mtlioncache.png

    3 - launch iPhoto and try again.

     

    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.

     

    NOTE 2:  In Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.

     

    OT

  • tessfrmct Level 1 Level 1 (0 points)

    Thanks for the info, but this did not help.  I tried opening iPhoto after deleting these files and got the same message "photo library is damaged or unreadable and cannot be opened".

     

    In Mountain Lion 10.8.2 - the path I followed to delete the files was MacHD/users/my name/library/containers/com.apple.iphoto/data/library/cache/com.apple.iphoto/ for cache.db and

    MacHD/users/my name/library/containers/com.apple.iphoto/data/library/preferences for com.apple.iphoto.plist

    Should I restore the deleted files?

     

    Yesterday after rebuilding the original library, I deleted the newest photos I had uploaded, thinking they may be the issue.  When I went to empty the trash, it froze about 1/4 of the way through.  I had to force close iPhoto again. Is there any other way to get rid of the photos in iPhoto trash?

     

    I already rebuilt the library using iPhoto Library Manager which has created another rebuilt library which seems OK, although a bit unorganized. 

     

    Is it safe (eventually) to delete the damaged library.  Should I delete the original from this location:

    Macintosh HD/users/my name/pictures/iPhotoLibrary, or do I have to delete the files in the Master folder too?

     

    Any other info would be helpful. Thank you.

  • Old Toad Level 10 Level 10 (130,275 points)

    No need to restore the files.  They get recreated the next time you launch iPhoto. It's time to apply some fixes to your library:  Apply the two fixes below in order as needed: 

     

    Fix #1

     

    Launch iPhoto with the Command+Option keys held down and rebuild the library.

     

    iP93rebuild.PNG

     

    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.

     

    Fix #2

     

    Using iPhoto Library Manager  to Rebuild Your iPhoto Library

     

    1 - download iPhoto Library Manager and launch.

     

    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.

     

    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.

     

    4 - In the next  window name the new library and select the location you want it to be placed.

     

    5 - Click on the Create button.

     

    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.