If anybody out there is using iPhoto to manage their digital photography and iTunes to synchronize there pictures with their iOS device, I have a word of caution: A combination of circumstances may cause your iTunes Sync to fail with an "unknown error" (I was getting 1140, others have reported -50). It appears that something changed within all the updates to iLife '09, OS X, and iTunes 10.7 that Apple rolled out Wednesday.
I have a ton of photos in my iPhoto library. They are organized by events that I've given descriptive names to, like "2008 Mercury Milan" for pictures of my car, or "2012 John Adams Freshman Football" for pictures of my son's football career. This includes a number of weddings or anniversaries that I've attended and taken pictures, so I'll say something like "2006 Rebecca & Joshua's Wedding" or "Mom & Dad's 50th Anniversary".
Seems innocent enough, but iPhoto uses XML as its database that ties photos to Events, Albums, and Slide Shows. And the ampersand ("&") is a code prefix. iPhoto stores the Event name with an XML tag like <Event>The Event Name<Event/>. When you insert and ampersand into this string, XML is expecting ? to describe a Special Character and never sees the terminating character. So, evidently iTunes was looking at this XML file and ignoring everything after the first ampersand it encountered.
What this does in the current version of iTunes is prevent you from selecting a subset of your iPhoto library to sync with your devices. Now, if your iPhoto library isn't very big, you probably have enough room on your iOS device for all of your pictures. Since I have over fifteen years of digital images, my iPhoto Library file is just over 125 GB. It's the single largest file I have on my Mac Pro. So, iTunes changed to enable all my photos, not the last three months worth like I had with the previous version. When I went to sync after the iTunes/OS X/iPhoto updates, kerblamo!
I posted to the Apple Support Forum and some other people have seen this issue on their machines. Someone downloaded a free-ware/share-ware program that manages your iPhoto LIbrary and allows it to exist in multiple places (a small, one-two year file located on your internal drive and all the rest in a library on an external HD. Supposedly it made recommendations on how to fix the errors it detected and the one user said it was the "AlbumData.xml" file. I found AlbumData2.xml inside the iPhoto Library contents and used Xcode to parse the XML file for errors. Xcode shows the tags and fields in different colors so it was easy to see where the file went off the rails. That's how I found the ampersand problem. All I had to do was look through 400 or so events and albums looking for an ampersand in the name (or in the album artist/title/track info for the default slide shows) and change it to "and" where it made sense.
An hour or so later and I can now sync my 32 GB iPhone again. And when my new iPhone 5 arrive in several hours, I'll be ready!