Summary:
The iTunes XML exporter is crashing due to funky characters is some of the fields of some of the songs in your library. You will need to fix the problematic fields in the songs in your library and this will fix the problem.
1) Your ITL file is not exporting properly
When iTunes is running it uses the ITL (ITunesLibrary) file. This is a binary file in a proprietary Apple format. When you exit iTunes, it tries to export your library to the XML file in the same directory (both files are in the iTunes/Media folder). If at some point you added a song with a funky character (non-latin characterset) in one of the fields (not necessarily the name of the file, but in the information fields), when the XML exporter tries to process the file, it crashes, thereby not updating the XML file.
The reason the XML file exists is so that other software can load the iTunes library; the ITL format is proprietary and has not be released publicly. DJ software, like Virtual DJ (or any other software that reads the XML for that matter), will read the information from the XML file. Even if you delete your entire library, if the XML exporter is crashing the DJ software will still load the old XML file (and therefore behave as though you still have you old library).
If you look at the dates of the two files, they should be the same. If they are not, or if you do not have an XML file, this problem is happening to you. Note that the ITL file is binary, and so it will be smaller, whereas the XML file is Unicode text and it will be much larger. To give you an idea, I have 16,000 songs in my library and the ITL is 6.5Mb; the XML is 26Mb.
Because your export likely worked in the past (before you added the problematic song in question), you still have a legacy XML file from some past operations.
2) What you need to do to find the song
I got this fix from the apple support community:
https://discussions.apple.com/thread/2168081?start=0&tstart=0
Thank you to Arseniy Ivanov for figuring this out!
Here is his suggestion:
-------
Okay, it seems I have figured out something here.
XML creation crashes on some of the characters that it's unable to convert to XML-entities correctly.
In my case, it was this particular sequence in the Composer field, which made it crash.
54 43 4F 4D 00 00 00 15 00 00 01 FF FE 9E DA
So just check whether any of your files contain some kind of weird characters.
The following method might be helpful:
1. Create new smart playlist with a rule "Playlist is Music"
2. Set limit to approx half your library size, ordered by Artist
3. Try to export in XML the playlist via File -> Library -> Export playlist
4. If the file has been created, delete it, increase the limit by some amount; if the export has failed, decrease limit by some amount.
5. After several tries you will find a limit number, after which the creation fails. Go down to the end of this playlist and check the info of the file.
It also might happen that several files contain those nasty characters, so you will have to clean them all up.
-------
The only suggestion I would add is a little further down the post. Take a look at the date that your XML file stopped updating. This is likely when you added the song in question. I made a smart playlist that added the most recent additions and it helped me find the file in question. You can be creative here. For me, I had a bunch of non-printable and non-latin characters in a variety of fields. When you get to a bunch of files that don't work, browse through the information view of the songs and look for the funny stuff. It does work!!
3) How you will know that it works
When you think you have fixed the problem, exit iTunes. If the XML file last modified date is the same as the ITL file - it worked!!
Good luck!