Saturday, March 29, 2008

iTunes won't close on Windows XP (SP2); uses 50% CPU

UPDATE 6/16/08: If you run NOD32 as your antivirus program, you might want to try this little trick (thanks, nka!): This article describes how to add iTunes to NOD32's exclusion list if you're running Windows XP. If you're running Vista, simply upgrade (free) to the new version of NOD32. If that doesn't work for you, try what I mentioned on the 5/16/08 update below.

UPDATE 5/16/08: Astute readers point out that simply disabling the Bonjour service as follows should solve the problem: Start > Run > services.msc > Double-Click on Bonjour service > Stop it > and in the Startup Type dropdown list, select Disabled. Then disable sharing in iTunes.


If you're reading this, it's probably because you're running Windows XP and iTunes won't exit/close/quit on its own unless you force it to quit (i.e., End Process in the Task Manager). You've been searching for a solution, but have found none.

Maybe you're just about to give up hope. I know I almost did. But then I fought back--and found an answer. Fair warning, though: it's a little extreme. You can experiment and cut out certain steps as you see fit, but I can't guarantee you'll enjoy the success I am currently enjoying. It's up to you.

And so, without further adieu, here's how to get iTunes back up and running (and closing on its own) once again:

0. Read through these instructions to have an idea of what you're going to do before you decide to do it.

1. Add/Remove Programs

2. Remove iTunes (In addition, I removed ALL Apple products, just to be safe, listed as 2.1-2.4)
2.1. Apple Mobile Device Support
2.2. Apple Software Update
2.3. Bonjour
2.4. Quicktime

3. Delete all leftover Apple-related files from C:\Documents and Settings\*
3.0. Note: do NOT delete anything in C:\Documents and Settings\YOUR USER NAME HERE\My Documents\My Music\iTunes (or wherever you store your iTunes music library file. iTunes will automatically use these files again if they're in the default location.
3.1. C:\Documents and Settings\All Users\Application Data\Apple Computer
3.2. C:\Documents and Settings\YOUR USER NAME HERE\Application Data\Apple Computer
3.3. C:\Documents and Settings\YOUR USER NAME HERE\Local Settings\Application Data\Apple
3.4. C:\Documents and Settings\YOUR USER NAME HERE\Local Settings\Application Data\Apple Computer

4. Delete all leftover Apple-related registry entries from the Registry
4.0. WARNING: Make a backup copy first. If you don't know much/anything about the registry, I'd skip this part unless you feel ballsy and like living on the wild side.
4.1. I use a tool called jv 16 PowerTools 2007 to make this task a little more efficient. Otherwise, it's time to just use the Find funciton of the Registry and do the dirty work.

5. Restart (save how-to guide, if you're writing one at the time) ;)

6. DO NOT UNDER ANY CIRCUMSTANCES WHATSOEVER enable the "Share my library on my local network" feature. This will result in iTunes exhibiting the lock-up you experienced upon closing, and it is impossible to recover from this and reset your iTunes preferences unless you follow the painful steps above. This is about my 3rd or 4th time doing this, so I'm confident this will work for you.

Good luck!

51 comments:

  1. Thanks for the tip, it seems to have fixed the problem. I miss iTunes 6, no hassle, no bloat, just music.

    ReplyDelete
  2. As per the apple forum post: Still in trouble with version7.6.2.9 ! (http://discussions.apple.com/thread.jspa?threadID=1474442&tstart=0.) I removed the Bonjour service by going to Start-->Settings-->Control Panel-->Add or Remove Programs

    Bonjour has to do with sharing your library over the network.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Erm, Mike, anonymous said "Bonjour has to do with sharing your library over the network." ... OK, not great English, but (s)he clearly meant "Bonjour is involved with sharing your library over the network".

    Which is correct - and is in full agreement with you.

    But thanks for your initial post. I've got to say - this is such a bind! Why can't it *just work* like most Apple stuff does (or used to)?!

    ReplyDelete
  5. Wow, time to throttle back my medication. ;-)

    Thanks for keeping me straight, bobsta... I've had a wretched cold over the last two weeks (and counting) and I think, at the time I posted that comment, that I totally read anonymous's post as "bonjour has [nothing] to do with...". So to my chagrin, I retract that comment. :-)

    ReplyDelete
  6. You don't actually have to jump through all those steps.

    1) Force iTunes to close via Task Manager -> End Task

    2) Uninstall Bonjour via Control Panel -> "Add Remove Programs"
    3) Launch iTunes.
    4) Disable Library Sharing.

    Now iTunes 7.6.2.9 should close normally.

    -LedHed

    ReplyDelete
  7. Just to expand on what others have said, you don't even have to uninstall Bonjour to fix iTunes, and you certainly dont have to delete every apple app as per the suggestion of the original post.
    To fix the iTunes freezing problem:

    Start-->Run-->services.msc-->Double-Click on Bonjour service--->Stop it--->and in the dropdown menu, select disable". Then open up iTunes and disable sharing.

    That way if you need Bonjour again in the future, all you have to do is go back into services.msc and enable it.

    ¡Buena suerte!

    -NKA

    ReplyDelete
  8. lol, its nice to be called astute.

    ReplyDelete
  9. I dont know if I have the same problem but iTunes wont shut down no matter what.

    It is just stuck, I have end tasked it and nothing. I have reboot my computer 4 times today for that one fact.

    ReplyDelete
  10. Yeah man, that sounds like the same problem to me. Try disabling bonjour first before you uninstall iTunes and all the other steps.

    Start-->Run-->services.msc-->Look for Bonjour-->Hit stop-->Then change Automatic to Disabled. Restart your Computer--->Open up iTunes-->Preferences--->Sharing--->Disable Share my Music Library

    If that fixes the problem, than you are are having the same problem, if not, than it could be something else.

    Post back and let us know if those steps helped or not.

    -NKA

    ReplyDelete
  11. You are most welcome, glad to help! Now if we could only get Apple to fix the error with an update that doesn't screw up something elese.

    ReplyDelete
  12. Thanks Mike! I am very grateful. I ended up doing what NKA said and iTunes is back to normal! It was the "share music" thing that screwed me up too. I was without iTunes for a week. Happy now.
    Sue

    ReplyDelete
  13. Thx man... the tip about the bonjour seams to have fixed it!

    ReplyDelete
  14. Of course, all these solutions are useless if what you're running iTunes _for_ is to provide shared songs over the local network. I guess we're just waiting for a bug fix for that?

    ReplyDelete
  15. thx, totally fixed the problem!

    ReplyDelete
  16. Thanks guys! That stupid bug has been winding me up no end the last couple of months

    ReplyDelete
  17. Thank you for this. My Shuffle decided that it was going to play silly buggers, and iTunes decided to follow suit even after a scorched-earth reinstall.

    ReplyDelete
  18. Has anyone checked to see if this bug has been fixed in iTunes 7.7? I'm afraid to check.

    ReplyDelete
  19. I took the plunge and ventured to check if this bug has been fixed with iTunes 7.7, it hasn't. What is wrong with Apple, why haven't they fixed this already?

    ReplyDelete
  20. @nka: yeah, this bug still persists with iTunes 7.7. I installed it too, and the same thing happened. In fact, I experienced another problem of iTunes hanging that was unrelated to Bonjour. Not sure exactly what caused it, but Apple really needs to get on the ball because there are LOADS of people experiencing this problem on Windows and something needs to be done about it. I would switch to WinAmp if it weren't for the fact that i own an iPhone.

    ReplyDelete
  21. @Mike: I went on the Apple forums and bumped up a post with a related issue, however I do not know how to contact Apple directly to inform them or harass them about the issue. Maybe some astute poster can figure out a means to email Apple directly so that we all can haras, uh, I mean petition them to fix these ridiculous glitches. I mean c'mon we are in version 7 here!

    ReplyDelete
  22. @nka: My only suggestion would be to leave iTunes feedback here: http://www.apple.com/feedback/itunesapp.html

    As large as Apple is, there's really no way that I know of to just call and complain--unless you know someone on the inside... Anyone? I'm sure someone out there reading this knows *someone* who works in the right department at Apple. ;-)

    ReplyDelete
  23. Great, now how should I phrase the bug exactly?

    ReplyDelete
  24. Something like.... "dear apple, i have discovered a serious flaw in itunes that has remained unfixed and could affect any user with an iphone or ipod." and then describe what happens .... in my case, it seemed like i could never close itunes successfully--I had to resort to using End Task in the task manager.... however, when I stopped the Bonjour service, the problem went away, so I think it has to do with Bonjour, but I'm not exactly sure.

    But either way, it is affecting many people (see the forums) and has the potential to affect many, many more, especially with the launch of the new iPhone 3G.

    I track what pages receive the most hits on my blog. Thus far, this page ranks 1st place among all my other posts. Even more curious, my blog's daily traffic count has doubled since July 11th and most of my hits are coming from people having problems with iTunes.

    ReplyDelete
  25. excellent, totally going to steal that and pretend that your blog is mine, muahahhahahahah! And then I am going to take over the world.

    ReplyDelete
  26. Hey all, just found this post on Apple Discussions forum that fixed my problem, without having to disable sharing or bonjour. The problem for me was with ESET's NOD32:

    *Note to everyone here in this thread*

    interconnect has fixed his problem with iTunes hanging when trying to quit. He had Eset's Nod32 antivirus installed on the PC, and was able to fix the problem by using the measures from the following Eset troubleshooting document:

    iTunes not working with your ESET security product?

    Here's a link to interconnect's post where he reports his solution:

    http://discussions.apple.com/message.jspa?messageID=7556167#7556167

    @Mike: By any chance are you using NOD32 for your antivirus?

    ReplyDelete
  27. Very interesting; I do run NOD32 as my antivirus program. I will take a look at implementing this when my laptop decides to act right. See, it decided to have a series of heart attacks the other night and it won't stay on long enough to boot up (I think it's a power supply or perhaps a motherboard issue)... so I went out and bought a shiny new 24" 2.8GHz iMac to replace the aging dinosaur.

    Once I get that laptop running again long enough to test it, I'll give that a whirl. Thanks nka!

    ReplyDelete
  28. @Mike: Hey don't thank me, I didnt come up with the solution, I just subscribed to the post. Lucky for me, since I have been subscribing to that post for over 6 months (i think) and finally someone posts something of use.

    So you are switching over to the dark side then? lol

    ReplyDelete
  29. @nka: Well I'm thanking you for coming back here and posting info about what you found! :-) Yes, switched over to the .... wait, dark side??? =P Naw, I've had a Mac a few years ago but company required PC so I sold mine and used the company-issued laptop (the one that just died on me). Now that I'm no longer with that company and don't need a PC, I can go back to my favorite OS.

    Don't worry, though, I can and will always run Windows on my Mac... for games and other apps. Parallels and Bootcamp FTW! Have a great day.

    ReplyDelete
  30. I'll add to that. After 7.7 install iTunes would not closed - would just hang. After disabling Bonjoure and turning off 'share' .. now works great. Thanks much for the great tip !!! Was this trial and error .. or was fix listed on Apple website ?

    ReplyDelete
  31. Thanx a Lot

    Works on my Itunes 7.7

    :)

    ReplyDelete
  32. Thx the tip about the bonjour seams to have fixed it! aham :P

    ReplyDelete
  33. OHHH MYYY GODDDD!!!

    I have been looking for this solution for SSSUUUUCCCHHH a long time! This problem has been bothering me, especially because I always forget to force the process to shut down and every time I closed iTunes it would crash my computer!

    I believe I owe you every bit of thank you! So, THNX SO MUCH!!!

    This truly saved me... cause I was so frustrated cause I tend to use iTunes almost every day!

    Thx again!

    ReplyDelete
  34. Thanks so much Nka for the NOD fix, solved so much frustration and I never would have worked it out otherwise, and Mizzike for bringing it to my attention. What a great team effort!

    ReplyDelete
  35. @yeahwrite: You are most welcome. I am glad that I could do my part to help.

    ReplyDelete
  36. yeah baby, thats make me happy!

    ReplyDelete
  37. wow, it really worked disabling the Bonjour service....thanks a lot!!!!

    ReplyDelete
  38. problem still exsists in itunes 8

    ReplyDelete
  39. i don't use NOD, so bonjour was the only fix that worked on iTunes 8(thx btw). I haven't seen anyone else describe my *particular* problem, which was that i only installed iTunes to share my mp3s with a less-than-computer-savvy friend with a new iPod touch, so i was totally ready to uninstall this bug-ridden POS as soon as i was through loading the tunes, since I don't have an iPod (go figure!) Among many wierd things itunes did, when i quit the app today at lunch time and left my computer running, I came home at 7pm to find that it's still running in the background using 98% of my resources and I couldn't force quit or end-process-tree to get it to stop. i had to reboot. Google "itunes process quit" led me to this page. thanks again.

    ReplyDelete
  40. @Raymond: Glad that you found the suggestions helpful.

    ReplyDelete
  41. Something weird happened with my Itunes. I went to stream an audio file from a website, and real player opened, and Itunes stopped 'responding." I didn't shut down Itunes, however. It disappeared on its own--from the screen, I mean. Windows Task Manager does not acknowledge that Itunes is running--but it's definitely running. Non-stop. So music is playing, but I can neither open nor close Itunes.
    If there is a way to resolve this without restarting my computer, I'd be much obliged. My computer is near death, and I never restart it.
    It's a Dell, running Windows XP.

    ReplyDelete
  42. @Anonymous: In Task Manager, click on the Processes tab and sort by name. iTunes should be in *this* list. It might not appear in the first tab, the Applications tab, but it definitely should appear in the Processes tab if it is indeed open. From here, you can click on the iTunes list item and click the End Process button at the bottom. Hope that helps.

    ReplyDelete
  43. Of course, the Bounjour fix isn't available to those of us who also run Tivo Server/Desktop on our iTunes machines, as the Tivo software requires it.

    I have found that installing Prio and setting iTunes.exe to always run at the lowest possible priority makes it behave a little better -- when it gets into its runaway state, eating 90+ percent of CPU, it allows me to retain enough control over the PC to be able to close iTunes.

    Get Prio -- it's free -- at
    http://www.prnwatch.com/prio.html

    ReplyDelete
  44. I'm hoping this blog will once again be my savior. I have had nothing but problems since installing iTunes on my 64-bit Win 7 machine. The playback skips whenever I click my mouse, or use my scroll wheel. I started a discussion on Apple Support Discussions, but they have been fruitless. Please someone find a solution to why iTunes playback is skipping all the time.

    ReplyDelete
  45. You are my savior!!!! This has been tormenting me for ages! Now it's been fixed with that Bonjour trick! Thanks!

    ReplyDelete
  46. Worked for me too. Can't believe this is still a problem nearly two years later!! Come on Apple, extract a digit!!!!

    Thanks for the help guys.

    ReplyDelete
  47. Mizzike FTW. Thanks man, this was really pissing me off...

    ReplyDelete
  48. I had this same problem (50% CPU consumed by itunes process after closing itunes) , but the proposed workarounds simply didn't work.

    After trying everything...even reinstalling the whole computer I found that the problem was related to a corrupt Itunes Library XML file. When formatting I kept the xml file so that i did not have to re-import all the music. What a mistake!! There was some peculiarity in the xml that prevented itunes from closing properly.

    ReplyDelete