Previous 1 2 3 4 5 Next 63 Replies Latest reply: Oct 3, 2010 8:08 PM by wait confused Go to original post
  • DIY_Addict Level 1 Level 1 (0 points)
    I've solved it! In my case, anyway...

    iTunes crashes if the total length of the filename (including the full path) is greater than 255.

    This wasn't obvious, because it crashes while trying to load a seemingly different file when synchronizing, but look for particularly long filenames, then exclude them from sync or make them shorter.

    Come on Apple - this is programming 101!! A check for long filenames so you can give an error message rather than crash the whole of iTunes. Shocking.
  • Pmerrill87 Level 1 Level 1 (0 points)
    this was exactly my problem! I changed the root folders the songs were in and now everything syncs fine! Thank you so much, I was getting sch a headache....

    Message was edited by: Pmerrill87
  • johno49 Level 1 Level 1 (0 points)
    Can confirm for Mac as well that it is the length of the filepath. To locate the problem filepaths, I exported my whole library playlist as a text file which I imported into a database and calculated the length of the "location" field. I had a dozen classical tunes which resulted in location strings exceeding the limit. I renamed a few folders, repaired the locations in iTunes and finally I'm syncing my iPod again in 9.2. Typically it was classical pieces where the main folder is named after a multitude of performers-choir-conductor-orchestra - plus the CD title folder being long as were the filenames of a few pieces. The main culprit was a Carmina Burana CD. Thanks DIY_Addict! Definitely worth adding to a FAQ list.
  • Pmerrill87 Level 1 Level 1 (0 points)
    How the heck did you figure this out? haha I wish there was a specific error message that came up saying the file name path was too long, instead of just crashing itunes. It would have saved my a a lot of frustration. Hopefully other people see this too because it seems like many others are having the same problem.
  • DIY_Addict Level 1 Level 1 (0 points)
    Pmerrill87, It took a lot of experimentation, but it helps that my day job is a software engineer .

    I've reported this to Apple, but they are highly skeptical, preferring to blame the fault on Windows instead.

    Johno49, Very interesting to know that it occurs on Macs too. They are investigating further and say that they'll get back to me.

    So it will be useful to point them to this forum. Hopefully they'll take notice and fix in the next release - it's a very easy fix.
  • GhostWKD Level 1 Level 1 (0 points)
    Will give this a go but having the same problem re syncing crashing my itunes, although files that sync fine when i remove the trouble one it then crashes on the ones that sync'd fine before. So that would indicate its not a error with the filename/path?

    So many problems, i'm off on holiday tomorrow relying on my iphone for music etc for ~23 hours flying (yes i know it wont last that long...) - upgraded to OS4 and my cell data stopped working, fixed with a restore and now cant move any music to my iphone, this really is unacceptable surely?
  • DIY_Addict Level 1 Level 1 (0 points)
    GhostWKD, Give it a go - the file that actually causes the crash is different to the one that appears in the top window at the time of the crash, (which made it very hard to diagnose this problem). It'll be a file close before that one.
  • GhostWKD Level 1 Level 1 (0 points)
    Will definately give it a go, any idea how to start trying to track down the long filename/path file(s)?

    Is this something new to OS4? as worked fine prior to upgrading and added no new music in the mean time?
  • AppleSaucey55 Level 1 Level 1 (0 points)
    Yeah, the freezing crap with my iPhone 4 and the current iTunes has really, REALLY gotten old. Is there only 2 programmers at Apple? Can someone get off their butt and issue a fix?
  • tomdkat Level 1 Level 1 (15 points)

    Does your filename length theory apply only to files being sync'd or does it apply to files in the music library, in general?

    A friend running Windows 7 has been experiencing Windows 7 crashes (Windows itself shuts down and turns off the system) when playing music in iTunes 9.3.1. I'll have her check the filename lengths of a few songs to see how long they are and see if I can identify any patterns.


  • Flame-X Level 1 Level 1 (0 points)
    Unfortunately, even rolling back version of itunes, it keeps crashing everytime I sync. Even worse, v9.1.1 or lower won't recognize the Ipod Touch 3G. If this doesn't get fixed soon, I'll be forced to return the itouch and get a different mp3 player.

    Message was edited by: Flame-X
  • manu55 Level 1 Level 1 (0 points)
    Just be patient.

    Using an ipod video, MAC OS 10.6

    There are several steps I took

    1. Go to settings>devices>click on prevent devices from connecting automatically. Make sure ipod is not connected at the time
    2. Plug in ipod
    3. Restore your ipod
    4. Turn off all the selection tabs in ipod menu (enable disk mode, sync only checked songs... etc)
    5. Apply
    6. It will hang, but just wait a couple of minutes. Worked for me.
  • DIY_Addict Level 1 Level 1 (0 points)

    It's possible it could crash whenever a song with a long filepath is played by iTunes, since iTunes only stores a reference to where the song is stored. So it wouldn't crash until it loaded the song to play it.

    When an application allocates some space for a filename/path, then uses more than that space because the filename/path is too long, it uses memory illegally. Which memory it poaches depends on other aspects of the system. It may be in the space reserved for the app, causing the app to behave erratically or intermittently. Or it may be in the space reserved for Windows (or OSX), in which case Windows will usually notice and shut the app down. We see this as a crash. If it poaches memory from some application running in the background, it's quite possible that Windows could crash.

    In other words, yes, check the lengths of the filepaths (you can use the info pane in iTunes - the full path used is at the bottom of the pane. If it's more than three lines long, start to worry.)
  • Thegame247 Level 1 Level 1 (0 points)
    This is happening to me and i have an ipod touch iv also done everything uninstalling deauthorizing system restore,etc nothing seems to work =[
  • adjacent Level 1 Level 1 (0 points)
    thanks so much -- this was happening to me as well and you helped me solve my problem.