Frequently a sign of a damaged database.
Restore from your back up or
Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
If that fails:
Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
I seem to have the same problem, and unfortunately, neither of these options has worked. I tried deleting any preference or cache files I could find associated with iPhoto, and even tried creating a new library with nothing at all in it. It still refuses to quit.
The symptom is that when you select the Quit menu item from the iPhoto menu, the word iPhoto remains highlighted in the menu bar but nothing happens after that no matter how long you wait. I don't get a beach ball cursor, yet the user interface is unresponsive. If you switch to another application, you cannot return to iPhoto. The only solution is to force quit.
I have noticed that iPhoto does quit from other user accounts, so it's probably something corrupt in my home Library folder someplace, but I haven't figured out what it is.
Like in Orla's case, I think it started happening around the time I updated to 9.1.2. They just released 9.1.3 which I installed, but the problem persists.
No Console messages other than comments that iPhoto was force terminated, but I did that of course. Well, I tried deleting all preferences and what not and restarting the computer a couple of times and it looks like the Quit is working again! I wish I knew exactly the exact sequence of events to fix this problem in case others encounter it, but it seems this had more to do with something corrupt in the user home Library than in the photo library itself. Well, hopefully it's fixed for good now…
Oh, a couple of more observations I made during trouble-shooting. First, iPhoto stayed quite active in the Activity Monitor while it was stuck like this. Not sure what it was up to (I sampled the application and it looked to be spinning around the event loop but I couldn't tell where it was hung up). Then I checked with fs_usage to see if it was grinding the disk, but not much so. There was another process called EyeConnect that was periodically accessing the iPhoto library. I gather that's part of Elgato's EyeTV software. There's an outside chance it was interfering with iPhoto, but who knows?