iPhoto 5 is very prone to corrupting its library. Symptoms are : it crashes or hangs when you launch it. Of course, you could quit iPhoto, go to your user's Pictures folder and rename 'iPhoto library' to something else. Then you could launch iPhoto, and start over with a fresh library. You could, but you would lose all your albums, rolls, comments, etc., and you would have to extract all your photos from your old library.
I did not want to do that. So when iPhoto stopped working, I tried to rebuild the database (by keeping option shift and command pressed while launching iPhoto). iPhoto kept hanging after the rebuild was over. I then opened Console, and looked at console.log ; I saw lines such as these:
iPhoto[3547] Unable to export /Users/mic/Pictures/iPhoto
Library/2004/02/23/F1010033.JPG
So I force quit iPhoto, navigated to the folder mentioned in the above line, and moved it to my desktop. I then tried rebulding the database again: it kind of worked: iPhoto was usable, even though it used quite a lot of CPU. In iPhoto, I deleted (from the library and albums) all of the photos that were in the folder I moved earlier, and emptied the trash. Don't restart iPhoto before you delete all of the missing photos, otherwise you will have to start from scratch!
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050209140525182