Wednesday, August 30, 2006

iPhoto 6 bug: flaky 'revert to original'

Update 10/26/07: iLife 2008 (iPhoto 7.1) has fixed this bug.

iPhoto is supposed to keep an original image untouched. Edits are applied to a copy. The originals live in one folder hierarchy, modified images in another. If an image is edited, iPhoto shows a 'revert to original' option.

That's the theory.

In my case an attempt to merge iPhoto Libraries using iPhoto Library Manager uncovered hundreds of images that are flaky in my the iPhoto Library database. The images themselves are fine. They're in the Originals folder. They really have no 'modified' equivalents. However, iPhoto "thinks" they have modified versions.

In other words, this Library is infested by phantom "modified" images. They don't exist, but iPhoto thinks they exist, so it shows me the 'revert to original' option when it shouldn't. By itself that's a cosmetic issue, but I think this is causing problems with several secondary products, especially with iPhoto Library Manager but possibly also PictureSync.

Selecting 'revert to original' does nothing. (This is good, in earlier versions of iPhoto this action would sometimes DELETE the original.)

I should note I've never used 'iPhoto Diet' or anything like that and I've never messed with my originals within iPhoto. This is the inverse of the known problem where a modified photo exists but the Original has been lost, moved, or deleted.

If I edit an image, then 'revert to original', the reversion works properly. After reverting the option is (correctly) grayed out in iPhoto and unavailable.

These are older images, exposed to nasty bugs in many prior versions of iPhoto. This Library may date back to iPhoto 2 and was certainly exposed to the many iPhoto 4 bugs.

I think iPhoto 6 is a decent product, but it follows a long line of disastrous releases. I would never claim Apple releases well tested products.

Alas, a Google search and a Sherlock search of the knowledge base didn't turn up anything useful. I've asked the author of IPLM for advice and I'll update this posting with what I learn.

Updates:
  1. I did a complete rebuild of my iPhoto Library. The good news is that the rebuild didn't turn up any bad images and the rebuilt library tracked the original pretty well. As usual the rebuild messed up roll metadata. Since it didn't fix the problem I deleted the rebuilt Library.
  2. I have a theory this problem arises when one uses the burn-to-CD or IPHOTO.XML method to merge iPhoto Libraries. iPhoto imports the Original and Modified files correctly, but there's a bug with unmodified Originals that leads to the above problems. (PS. I doubt this merge technique works at all well with RAW files.)
Update 9/1:

Wow, this is a gnarly bug. Brian Webster of IPLM fame is helping debug what's happening and I've gotten some useful comments from the iPhoto Discussion area:

Here's a comment I posted to the discussion thread:
... I tested a (risky) variant of the 'import from iPhoto CD' technique documented here:

http://www.faughnan.com/digcam.html#LibraryMerge

I did the same import twice, once on a brand new iPhoto Library and again on my main Library with the known problem.

When I imported into a new Library there were no problems with the 'revert to original' -- everything behaved as it should. Revert to Original only showed up when an image had been modified.

However, when I repeated the exact same import into my problematic Library every image had the 'revert to original' option available -- whether the image had been modified or not.

On the other hand, directly importing from the file system into my problematic Library didn't produce the bug.

So it's a combination of something about this Library and something about the undocumented Library import I tested with. I've yet to test with the semi-documented "import from iPhoto CD" method with this Library but I may try tomorrow. I'm also going to test using the 'import via shared albums method Pogue and Story document in 'iPhoto 6 The Missing Manual'. My suspicion is that all methods will produce the same problems with this particular Library...
Update 9/3:

I tried the partial merge technique published by Story and Pogue -- sharing a Library from another account. I imported into my "bad" Library and it did NOT (so far) demonstrate the 'Revert to Original' bug.

Update 9/14/06:

Brian Webster sent me a new version of IPLM to beta test. It no longer gave the 'missing image' message but there was interesting new flakiness with Library Rebuild. Library Merge seemed to work 3/4 tries, but 1/4 times it made an error consistent with the Library Rebuild problems. So whatever this bug is, it's darned sneaky.

Update 10/4/06:

We never figured this out, but I'm pleased to report the bug does not appear to confuse Aperture 1.5. It imported my test Library correctly.

Update 5/18/07:

Tom, writing in comments, discovers where the bug is. I'll tell Brian and post in Apple forums:
This week I converted to iPhoto6 and encountered the same problem. Some older photo's have the "revert to original". I examined the file Library6.iPhoto and concluded that the conversion of a field "idED" went wrong. I was able to repair the file using a HEX editor.
Thanks Tom!

3 comments:

Anonymous said...

Any idea if something like this will work for Aperture Libraries? The format looks very similar if not identical.

Anonymous said...

This week I converted to iPhoto6 and encountered the same problem. Some older photo's have the "revert to original". I examined the file Library6.iPhoto and concluded that the conversion if a field "idED" went wrong. I was able to repair the file using a HEX editor.

marlowned said...

I have modified versions of my pictures... but whenever I try to upload them to anywhere else (like flickr, or facebook) the original version is uploaded. It's extremely frustrating. But it "just works" right?