This morning when I tried to start up iTunes I received an error stating that either the library was locked or I did not have write permission to it. I figured that this was most likely related to the problems I had yesterday, as I was burning a CD during one of the lockups.
After a bit of mucking around the system I was able to come up with this not-so-elegant workaround. I made my changes from the command line, but you should be able to do this from Finder as well.
- Make sure iTunes is not running.
- Go to your ~/Music/iTunes folder.
- Copy the files "iTunes Music Library.xml" and "iTunes 3 Music Library" to "iTunes Music Libary.xml.backup" and "iTunes 3 Music Libary.backup".
- Remove the files "iTunes Music Library.xml" and "iTunes 3 Music Library".
- Rename "iTunes Music Library.xml.backup" to "iTunes Music Library.xml" and "iTunes 3 Music Library.backup" to "iTunes 3 Music Library".
- Relaunch iTunes. Problem should be fixed.

