The battery on my 2008 15″ MacBook Pro is dying an ugly death. Last night the battery level dropped precipitously as I imported pictures from an SD card into Aperture 3. When the battery level reached about 75%, the MacBook shut off in mid-import.

I plugged the computer in and rebooted, expecting to complete the import. Not so. Aperture 3 quit unexpectedly every time I tried to launch it. I ran (or tried to run) the built-in diagnotic trio of Repair Permissions, Repair Database and Rebuild Database  by holding down the Cmd-Option combo while starting Aperture. Aperture happily repaired permissions, but quit while trying to repair or rebuild the DB.

I was able to start Aperture with a fresh library, so I determined that it wasn’t the Aperture prefs or executable that were causing the problem.

But how could I get my 64 GB of photos back in some coherent form? Any attempt to import the contents of the corrupt Aperture Library into a new empty library resulted in “The Crash.”

I right-clicked on the Aperture Library and used “Show Package Contents” to navigate to the folder containing all of the masters (original JPEGS and RAW files). I decided to import the contents of the Masters folder into a new Library.

This procedure worked, but my Projects and Albums were all still toast, as were my Faces and Places data.

Faced with the prospect of having to restructure my photo library from scratch, I cast about on the Internet and found this little gem, which I want to share:
Aperture 3 rebuild library – SQLITE MISUSE
The procedure outlined in this post basically involves deleting the SQLite database files that make up the Aperture Library and then forcing the Library to rebuild from scratch. I can only surmise that I couldn’t do this before, because Aperture was choking on the original, corrupted database files while trying to rebuild.

A word to the wise: Always backup your computer.

fr_CAFrançais du Canada