My iPhone 4S (iOS 6.1.3) crashed and my music all disappeared. iTunes was confused and refused to resync the music (the blue Audio bar showed 0 bytes). Doesn't have to do with iTunes match--- I don't use it.
One thing I tried was to find the list of (greyed-out) songs on the phone in iTunes, try to play it and then resync. It seemed like it might work (the blue bar moved to the right where it should be) but once it synced again it went back to zero.
Another suggestion I found was to restore the phone from a backup then resync. I got stopped by a message:
There are purchased items on the iPhone “ManiPod” that have not been transferred to your iTunes library. If you restore this iPhone, these items will be erased and you will have to purchase them again. Are you sure you want to continue?
Since I had synced numerous times and done a manual backup, I couldn't imagine what would be on the phone that wouldn't have been transferred to iTunes, but I didn't want to continue. It would only be apps cause I don't think I've ever purchased music from the apple store. But wait, I thought the store kept a record of everything you purchase. Why would you have to purchase again?!?
Anyway, I found this thread, and what I did was uncheck "Sync only checked songs and videos", then sync. I also turned off wifi sync. It looked like it was going to work, but it only transferred the "unchecked" songs. Though at that point the blue bar showed 45 GB on the phone, which is about what it should be, but it wasn't really there.
Then I checked "sync only checked items" again and synced-- it removed those and I ended up once again with no music. I think mac itunes needs the "reset sync history" button that windoze has.
Now to try some other things. Uncheck "Convert higher bit rate songs to AAC". Hmmmm? Well, it syncs only those songs. How about "Manually manage songs and videos" and sync just one playlist? It erases everything but a few higher-bit-rate songs from that playlist.
That's about all I can see to try. iTunes is just convinced that all those songs are on there, though it's a bit schizoid about it. It knows they're not _really_ there cause they're greyed out and the blue bar shows (usually) what's actually there.
What next? There must be some plist somewhere of sync history that needs to be deleted.
Should I restore the phone at the risk I might lose some unknown purchase? (it really ought to tell you what those purchase are)