My friend Rob Griffiths pinged me the other day. He had gotten a brand new iPhone 6, (and ribbed me about it), but was having problems syncing it. He could sync some content, but not movies; then some movies, but not all; then he couldn’t sync at all.
Rob took the extreme move of writing to Tim Cook, one of whose staffers read the email and reacted, quickly. It turned out, as Rob explains, that the problem was caused by duplicate tracks in his iTunes library:
“In the current version of iTunes/iOS, there’s a bug that only appears when you have duplicates of purchased songs. When encountered, a duplicate of a purchased song will (almost always) cause iTunes to silently stop syncing.”
This is interesting, in part because I get lots of emails about problems with syncing iOS devices, and I’d never found a cause. I’m not sure this is the only issue, because sync problems are multifarious. For example, in the few days that I had my iPhone 6, I had to restore it twice, because the device lost track of my music and showed it all as “Other” content. I’ve seen this occur in the past when syncs are interrupted, but this was happening to me with a new device, allowing it to sync completely.
Rob eventually scoured his library with Doug Adams’ Dupin, an app that finds duplicates in iTunes. (Read Doug’s write-up of the story.) I ran Dupin, and was surprised to find that I, too, had a number of duplicates, one of which was a full purchased album by Bob Dylan. I know I had never downloaded that album twice, so I suspect something odd going on behind the scenes in iTunes when it organizes libraries. And Rob is sure that he never downloaded his duplicate tracks twice, but what was interesting was some of them were older 128 kbps tracks with DRM, and some were newer versions; perhaps he upgraded them, at some point, and iTunes didn’t delete the older ones?
What is more likely is that these duplicates were added to his library when he chose to transfer purchases from an iOS device:

I know I’ve done that at times, when I’ve updated apps on my iPhone, for example, and didn’t want to download them again in iTunes (since my bandwidth is limited). But why would it have, in my case, only transferred one album?
I wonder if this is just a bug with iTunes, or with specific iOS devices. Rob never had problems syncing his iPhone 5, and I saw sync problems with my iPhone 6, but my 5s generally syncs without any issues. So there’s some odd combination here causing the issue.
Whatever the case, if you do have sync problems with an iOS device, I’d suggest getting Dupin and scouring your library. It may save you a lot of headache.