This problem is typically from a defected or broken XML file in the Music library folder. In order to fix this, go to: ~/Music/iTunes/iTunes Library.xml
Either delete this file (Move it the trash) or move it to the desktop. Either way, iTunes will have to recreate it. First, of course, QUIT iTUNES!
If an error occurs (which is likely, because it is a broken file) and you cannot move or delete it, try deleting it with the Terminal.
Be very careful not to delete the wrong file. The Terminal doesn't simply move the file to the trash, it DELETES IT. Here is what you need to do for this:
Open up a new Shell and type: rm -rf
Then, to eliminate confusion or accidents, just drag the file to the shell and the exact path will appear after it.
Voila! It should be deleted.
Then, go ahead and open up iTunes. Rename a song or something and the iTunes Library will recreate the iTunes Library.xml file.
This works the same for just about any iLife application! If there is a problem accessing anything in the Media Browser, find the Library.xml file and delete it, then force the application to recreate a fresh, unbroken copy.
Hope this helps!
Here are a few links that should help you out: Deleting a File with Terminal
Ben, thanks for the help here. I spent the other evening on the phone with apple and this is basically what they had me do. Delete my library.xml file. I was unable to reimport my playlists. It just gave me errors. So I just reimported all the music files back into my library. Everything came back in and then I rebuilt my playlists by hand.
Now iPhoto and iMovie can see the iTunes librarys. All is right with the world.!!!
To follow up on what Ben said, for the benefit of others who may come here:
The "iTunes Library.xml" file is a summary of your iTunes data for use by other applications (like iPhoto), you can delete it whenever you want and it can just be recreated. Don't confuse it with the "iTunes Library.itl" file, which actually contains all of your playlists and other data.
This support article has a good overview of the two files - http://support.apple.com/kb/HT1451
I was also getting the "Open iTunes to populate this list" message. In my case deleting the XML file did not fix my problem, because I actually had bad data in the library. So every time iTunes recreated it, it just put the bad data back in there. I was able to find the problem (a track with a bad file location) using the "xmllint" tool from the terminal. If you are somewhat comfortable with the terminal, this will let you find the problem track or tracks very quickly.
In a terminal window:
xmllint --noout $HOME/Music/iTunes/iTunes\ Library.xml
The output of xmllint listed a parser error on line 54334. Using "less" I was able to pull up that part of the XML.
less $HOME/Music/iTunes/iTunes\ Library.xml (type 54334 then G to go that line)
Once I figured out what track it was, I was able to go into iTunes, find it and fix it. As soon as it was fixed iPhoto was able to see tracks in iTunes again.