Dan Wood: The Eponymous Weblog

Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his weblog, which mostly covers geeky topics like Macs and Mac Programming.

Useful Tidbits and Egotistical Musings from Dan Wood

Categories: Mac OS X · Cocoa Programming · General · All Categories

Thu, 01 Sep 2005

I'll get an early start on Report-An-Apple-Bug Friday, considering I missed last week. I was all ready to "squeak" about a minor UI annoyance of some sort or another, but a frustrating evening of iPhoto crashes changed my mind.

Now, I sent the crash reports to Apple from the built-in mechanism; I hope that these are actually heeded! But the report I'm filing is not about the crashes, it's about the way that significant data can be easily lost when the Application crashes.

I've been an advocate of auto-save for a long time. And iPhoto is nice in that it effectively auto-saves. But it doesn't do it enough! It's possible to spend a long time organizing your photo album, and then lose all or most of your work when the program crashes. (Photo editing is written after you finish with each photo, but album information is not.) So my report to Apple, showing 3 different kinds of data that are lost, is that iPhoto needs to write its changes to disk immediately after they happen.


So my report is 4242381. (I'm geekily hyperlinking this as a rdar:// URL for Apple employees, as Jens Alfke suggested at Inessential). Here is the text part of my bug:

Summary: 
When iPhoto crashes (which it does; I've submitted
separate crash reports from the in-App mechanism),
significant data is lost or corrupted, including file
names, source albums, and thumbnail images.

Steps to Reproduce: 
1. Drag one or more photos from your library to a create
	a new album in the source list
2. (Optional) Drag some more photos there (to "untitled
	album")
3. Simulate a crash by choosing "Force Quit" from the
	dock menu for iPhoto
4. Lauch iPhoto again

(see "A" below)

5, Double-click any photo for editing
6. Drag a rectangle that is TALL/SKINNY
7. Click "Crop" button
8. Click "Done" button.
9. Simulate a crash (see above)
10. Lauch iPhoto again

(see "B" below)

11. Select any photo
12. Click the "i" button in the lower left if the
	Information panel is not visible
13. Edit the photo name
14. Optionally, Repeat 11-13 above for a few more photos
15. Simulate a crash (see above)
16. Lauch iPhoto again
17. Click on the files you changed to observe their file
	names.

(see "C" below)

Expected Results: 

A: I should see the changes I made to the source albums
	before the crash.
B: I should see a proper thumbnail of the cropped image
C: The photos I changed should show their changed names.

Actual Results: 

A: The changes to the albums were not saved at all.

B: Though the file was saved in cropped form, the
	thumbnail is stretched anamorphically; it seems
	to think that the aspect ratio of the original,
	uncropped image should be used.

C: The file names have not changed.

Regression: 
N/A

Notes: 

Although this might seem like an exercise in overkill,
the reality is the iPhoto, like any other application,
will crash from time to time.  Recently, I lost over
half-hour's work organizing my albums because of an
iPhoto crash.  My changes SHOULD have been written out
to disk immediately after any data-changing operation
so that in case of a crash, I would have not lost any
data.  It wouldn't be any perceivable lag to the user,
and the benefits would be enormous.

So ... as usual, I suggest that you, dear reader, do the same. (Use this if you don't have an Apple Developer Account.)