Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
iTunes Helper was still running, so I deleted it at /Applications/iTunes.app/Show Package Contents/Contents/MacOS/iTunesHelper.app.
That didn't help.

OK, all my toons are backed up, let's do the virgin thing.
Let me guess, you want me to trash every single Spotlight occurrence of iTunes (including invisible), and re-install iTunes (from Apple website???).

When trashing, I can't empty my Trash (too much useful stuff in there). I assume I will want to put it 'beyond the reach' of the OS, so I created a folder called iTunesX and trashed it.
When full of junk iTunes stuff, Get Info > Lock the folder! Probably unnecessary, but Lion is an unusual animal ...

I'm ready, let's get started.

Sorry for the late reply.

First of all, back up your entire iTunes Library. I know, it's a pain, but better be safe than sorry.

OK. First of all, kill the iTunes Helper. Then, drag the application's icon to the trash. Then open ~/Library/Prefrences and locate a file named "com.apple.iTunes...plist" and drag it to the trash, and generally in this preferences folder drag anything that has to do with iTunes into the trash.

Now for the hard part: Go into the folder into your home directory where iTunes has located its Library file. It's usually located into ~/Music/iTunes . There lie the most important things of iTunes: the XML and .plist files that describe what files you have added into your iTunes library and where. So, delete those files AFTER YOU HAVE BACKED THEM UP! And then delete the actual files you have added in your library.

After uninstallation completes, restart your computer and install iTunes by downloading it from Apple's site. Open it, change some configuration but don't begin importing your old songs and applications yet.

Does shutdown work after you use your empty iTunes?
 
Sorry for the late reply.

First of all, back up your entire iTunes Library. I know, it's a pain, but better be safe than sorry.

OK. First of all, kill the iTunes Helper. Then, drag the application's icon to the trash. Then open ~/Library/Prefrences and locate a file named "com.apple.iTunes...plist" and drag it to the trash, and generally in this preferences folder drag anything that has to do with iTunes into the trash.

Now for the hard part: Go into the folder into your home directory where iTunes has located its Library file. It's usually located into ~/Music/iTunes . There lie the most important things of iTunes: the XML and .plist files that describe what files you have added into your iTunes library and where. So, delete those files AFTER YOU HAVE BACKED THEM UP! And then delete the actual files you have added in your library.

After uninstallation completes, restart your computer and install iTunes by downloading it from Apple's site. Open it, change some configuration but don't begin importing your old songs and applications yet.

Does shutdown work after you use your empty iTunes?

All backed up via Time Machine (twice, using 2 HDs).
I've located the files above, but wouldn't I do a better job of blitzing if I 'trash every single Spotlight occurrence of iTunes (including invisible)'?
I'd manually check too ...
What do you mean by 'change some configuration'?
 
All backed up via Time Machine (twice, using 2 HDs).
I've located the files above, but wouldn't I do a better job of blitzing if I 'trash every single Spotlight occurrence of iTunes (including invisible)'?
I'd manually check too ...
What do you mean by 'change some configuration'?

I don't know if spotlight will find all preference files, but you can do this, also.

By changing some configuration I mean do something, anything at all, in the preferences, so that you force iTunes to create a new preferences file.
 
I don't know if spotlight will find all preference files, but you can do this, also.

By changing some configuration I mean do something, anything at all, in the preferences, so that you force iTunes to create a new preferences file.

Thanks, I'll get onto it this weekend and report back.
While I'm on the line, i've got another problem:
Click/release fast to open the Apple menu: it stays open.
Click/release slowly to open the Apple menu: it collapse on release.
There's a time-dependancy, I need a longer period.
How do I do that, eg in Terminal?
It's a howler of an omission on Apple's part, it's a disability thing (which I am).
 
Thanks, I'll get onto it this weekend and report back.
While I'm on the line, i've got another problem:
Click/release fast to open the Apple menu: it stays open.
Click/release slowly to open the Apple menu: it collapse on release.
There's a time-dependancy, I need a longer period.
How do I do that, eg in Terminal?
It's a howler of an omission on Apple's part, it's a disability thing (which I am).

I don't think it can be done even using the terminal, however, you should start a new thread about it. You have a higher chance of obtaining an answer in a new thread.
 
Try dragging it to your desktop, and trying again.
If it does not solve your problem you can drag it back.

Thanks for your time,

Tried and still hangs.

I'll try the iTunes re-install and report back.

----------

@Soulstorm,

There are a couple of things about the re-install I have trouble with:

1. There are no "com.apple.iTunes...plist" files in the preferences folder
2. Do I drag iTunes from the applications folder and into the trash before re-install?
If so the OS won't let me do this.
3. There is an XML file in the iTunes folder but no plist as you have mentioned.

Thanks,
 
Thanks for your time,

Tried and still hangs.

I'll try the iTunes re-install and report back.

----------

@Soulstorm,

There are a couple of things about the re-install I have trouble with:

1. There are no "com.apple.iTunes...plist" files in the preferences folder
2. Do I drag iTunes from the applications folder and into the trash before re-install?
If so the OS won't let me do this.
3. There is an XML file in the iTunes folder but no plist as you have mentioned.

Thanks,

@ JP123

1. Use Spotlight, type 'itunes'. At the top of the list is Show All in Finder. On the right of the window that appears, click '+'. On the left, drag the pop-up menu down to Name > begins with > 'itunes'. On the right, click '+' again. On the left, drag the pop-up menu down to System > Visible and Invisible. Delete what you judge deleteable (maybe all?). Repeat for Name > ends with > 'plist'.
2. To drag iTunes from the applications folder and into the trash before re-install, right-click on iTunes. Show package details. Right-click on Contents > Move to Trash > enter password. That should do it.
3. See (1). My plist is an invisible file in my iTunes _Music_ folder.
I'm trying this myself soon, the above is a guess. "Macs are so simple to use". Err, not really.

----------

@ JP123

1. Use Spotlight, type 'itunes'. At the top of the list is Show All in Finder. On the right of the window that appears, click '+'. On the left, drag the pop-up menu down to Name > begins with > 'itunes'. On the right, click '+' again. On the left, drag the pop-up menu down to System > Visible and Invisible. Delete what you judge deleteable (maybe all?). Repeat for Name > ends with > 'plist'.
2. To drag iTunes from the applications folder and into the trash before re-install, right-click on iTunes. Show package details. Right-click on Contents > Move to Trash > enter password. That should do it.
3. See (1). My plist is an invisible file in my iTunes _Music_ folder.
I'm trying this myself soon, the above is a guess. "Macs are so simple to use". Err, not really.

PS Name > contains > 'itunes' find a load more. Finder > View > Show Path Bar is handy.
 
iTunes still hangs restart/shutdown after re-install

Still Hangs...

I'm fairly sure I got everything but from tobychur's description just mentioned but I could never find the "plist" file you guys were talking about.

Thanks
 
Let me get this straight: After you uninstalled iTunes completely, and then reinstalled, did you open iTunes (while it is empty) then tried to shut down your computer and it still hanged while the library was empty?

That leads me to believe it's not a problem with iTunes, but the problem lies deeper into the system, but it is actually triggered with opening iTunes.

Do one last thing:

Download 10.7.2 combo update from Apple's site and install it. Doesn't matter what version you have, even if you have the latest version. Just install it. Make sure it's the combo update.

Does the problem persist?
 
Let me get this straight: After you uninstalled iTunes completely, and then reinstalled, did you open iTunes (while it is empty) then tried to shut down your computer and it still hanged while the library was empty?

That leads me to believe it's not a problem with iTunes, but the problem lies deeper into the system, but it is actually triggered with opening iTunes.

Do one last thing:

Download 10.7.2 combo update from Apple's site and install it. Doesn't matter what version you have, even if you have the latest version. Just install it. Make sure it's the combo update.

Does the problem persist?

I report:
I haven't tried flushing iToons yet.
I downloaded combo 10.7.2. Same (still hangs if iToons launched).
 
I report:
I haven't tried flushing iToons yet.
I downloaded combo 10.7.2. Same (still hangs if iToons launched).

I'm very sorry, but I think it's time to call Apple Technical Support.

That is the point where I would seriously consider a complete format. Maybe Apple can help you better with this. I wish I was in front of your computer, I would surely find something to help you with. But from the forums... it's kind of difficult.

Sorry I couldn't solve your problem.
 
I'm very sorry, but I think it's time to call Apple Technical Support.

That is the point where I would seriously consider a complete format. Maybe Apple can help you better with this. I wish I was in front of your computer, I would surely find something to help you with. But from the forums... it's kind of difficult.

Sorry I couldn't solve your problem.

I did get put onto a Tech Support guru, he sent me analysis tools, which I responded to. Then the conversation stopped for some reason or or other.
This was before I isolated my problems to iToons.
As you say, I have the benefit of seeing what's going on.
The shutdown log in Console is sort of helpful, when to refuses to shutdown the log has this inserted at the end:

20005865 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 39 PPID 1 PGID 25 pcscd
20007218 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 39 and continuing...

In activity monitor, PID 39 doesn't exist (it might if I launch iTunes).
PIDs 1 and 25 are launchd and securityd respectively. Any clues?
PS I did reformat and rebuild a while ago, but I imagine I recreated the problem from Time Machine?
 
I did get put onto a Tech Support guru, he sent me analysis tools, which I responded to. Then the conversation stopped for some reason or or other.
This was before I isolated my problems to iToons.
As you say, I have the benefit of seeing what's going on.
The shutdown log in Console is sort of helpful, when to refuses to shutdown the log has this inserted at the end:

20005865 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 39 PPID 1 PGID 25 pcscd
20007218 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 39 and continuing...

In activity monitor, PID 39 doesn't exist (it might if I launch iTunes).
PIDs 1 and 25 are launchd and securityd respectively. Any clues?
PS I did reformat and rebuild a while ago, but I imagine I recreated the problem from Time Machine?

Most probably yes. You recreated the problem with the time machine. However we now have the reason of why this happens. That stray process is the reason.

It seems that the problem has something to do with launchd in os x. Launchd replaced the old cron jobs that existed until 10.4. However, sometimes the launchd gets corrupted. One way to cope with the corruption is to delete the finder.plist that resides not your home/library/preferences. I don't know if this file contains anything related to launchd, but I remember deleting it has solved many problems for many people with similar problems like the thread starter.

Delete it, restart, and then see if the problem persists. If it does, we will begin cleaning the launchd entries.
 
Most probably yes. You recreated the problem with the time machine. However we now have the reason of why this happens. That stray process is the reason.

It seems that the problem has something to do with launchd in os x. Launchd replaced the old cron jobs that existed until 10.4. However, sometimes the launchd gets corrupted. One way to cope with the corruption is to delete the finder.plist that resides not your home/library/preferences. I don't know if this file contains anything related to launchd, but I remember deleting it has solved many problems for many people with similar problems like the thread starter.

Delete it, restart, and then see if the problem persists. If it does, we will begin cleaning the launchd entries.

apple.com.finder.plist deleted; opening iTunes still prevents shutdown. The last 5 lines of the shutdown log are now:

2034380 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 364 PPID 1 PGID 364 traceroute
2036000 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 295 PPID 1 PGID 83 prl_disp_servic
2037323 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 364 and continuing...
2038720 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 295 and continuing...
2039971 1 com.apple.launchd 1 com.apple.launchd System: About to call: reboot(RB_AUTOBOOT).
 
apple.com.finder.plist deleted; opening iTunes still prevents shutdown. The last 5 lines of the shutdown log are now:

2034380 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 364 PPID 1 PGID 364 traceroute
2036000 1 com.apple.launchd 1 com.apple.launchd System: Stray process at shutdown: PID 295 PPID 1 PGID 83 prl_disp_servic
2037323 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 364 and continuing...
2038720 1 com.apple.launchd 1 com.apple.launchd System: Sending SIGTERM to PID 295 and continuing...
2039971 1 com.apple.launchd 1 com.apple.launchd System: About to call: reboot(RB_AUTOBOOT).

This is way out of my league, but here are some thoughts:

The system gives processes a different PID each time they run. So each time you open iTunes, the subprocess that fails to shut down will have a different ID, so it will be impossible to shut it down before you shut down the computer. If only we had the change to open up a terminal when your application hangs in order to see the NAME of the process and not the PID...

Anyway, I would do this: The moment I would start up the computer, I would open the activity monitor. I would select "All Processes" from the top right, and would sort the results by PID in the process list. Programs and processes that start up later than other will have a bigger PID, so the latest programs will show up in the top of the list.

Then. I would open up iTunes, and observe which processes would appear at the top. Then, I would force quit them one by one, and attempt a restart.

Now, an experienced eye will know which of these processes belong to the system, and which belong to iTunes. You can shut them all down (the latest ones) just to experiment or at least post a screenshot in the forums with the activity monitor window immediately after iTunes has FINISHED loading (or at least immediately after iTunes has reached the point where you believe that it will prevent your computer from shutting down).

This sounds far fetched, but it is the only idea I have in order to figure out which process prevents shutdown.

EDIT: you can also write down the newest process PIDs and when your computer hangs, you can look the console afterwards and then look at what process has the nasty PID that gives you problems.
 
Last edited:
This is way out of my league, but here are some thoughts:

The system gives processes a different PID each time they run. So each time you open iTunes, the subprocess that fails to shut down will have a different ID, so it will be impossible to shut it down before you shut down the computer. If only we had the change to open up a terminal when your application hangs in order to see the NAME of the process and not the PID...

Anyway, I would do this: The moment I would start up the computer, I would open the activity monitor. I would select "All Processes" from the top right, and would sort the results by PID in the process list. Programs and processes that start up later than other will have a bigger PID, so the latest programs will show up in the top of the list.

Then. I would open up iTunes, and observe which processes would appear at the top. Then, I would force quit them one by one, and attempt a restart.

Now, an experienced eye will know which of these processes belong to the system, and which belong to iTunes. You can shut them all down (the latest ones) just to experiment or at least post a screenshot in the forums with the activity monitor window immediately after iTunes has FINISHED loading (or at least immediately after iTunes has reached the point where you believe that it will prevent your computer from shutting down).

This sounds far fetched, but it is the only idea I have in order to figure out which process prevents shutdown.

EDIT: you can also write down the newest process PIDs and when your computer hangs, you can look the console afterwards and then look at what process has the nasty PID that gives you problems.

Finally got round to doing all that.
Did it help?
Nah, running iTunes prevents shutdown.
Any bright ideas before I restore my music library?
 
Finally got round to doing all that.
Did it help?
Nah, running iTunes prevents shutdown.
Any bright ideas before I restore my music library?

One last idea:

Before you restore your iTunes Library, delete ALL songs and ALL applications from your iTunes Library. And then empty your trash. Restart. Don't mind if it doesn't shut down properly. Then open iTunes. Then shut down.

If it does shut down the second time properly, then it must be something in your library. If it doesn't, it is something in your preferences.

OK, I am out of ideas, you can do a restore now. :)
 
Lion hangs on shutdown or restart

Very interesting, I have exactly the same problem as well with my wife's Core i7 13" Macbook Air, Mid 2011 model.

Any attempt to shutdown is stymied if I have run iTunes - it seems to trigger a problem such that the kernel has some trouble shutting down a stray process or other, even after userspace shutdown seems to have occurred.

This also seems not to have anything to do with the iTunes library, since it occurs even in a fresh account in which no library even existed previously!!!

Did the original poster ever find a solution to this problem?

THanks
Peter
 
Note: My problem went away after I properly installed the Kaspersky antivirus that came with my Parallels 6.0.
I previously had trashed the application I think, but this didn't seem to get rid of everything. I then ran uninstall from a menu in parallels, and this seemed to make the problem go away.
 
iTunes Helper was still running, so I deleted it at /Applications/iTunes.app/Show Package Contents/Contents/MacOS/iTunesHelper.app.
That didn't help.

OK, all my toons are backed up, let's do the virgin thing.
Let me guess, you want me to trash every single Spotlight occurrence of iTunes (including invisible), and re-install iTunes (from Apple website???).

When trashing, I can't empty my Trash (too much useful stuff in there). I assume I will want to put it 'beyond the reach' of the OS, so I created a folder called iTunesX and trashed it.
When full of junk iTunes stuff, Get Info > Lock the folder! Probably unnecessary, but Lion is an unusual animal ...

I'm ready, let's get started.

Solved at long last!
Having tried everything except the bleedin' obvious, I tried the bleedin' obvious:

1. When restarting, hold down Cmd-R (ensure your are using a genuine Mac keyboard)..
2. Select the volume 'OSX Utilities' and boot up with this.
3. Select the 2nd option (rebuild the OS).

That's it; it'll take a while but it's totally automatic, you can go to bed.
All files untouched, bare minimum of OS and program upgrading (anyway all that is automated).
Nice one Apple! I have since found this sorts out a multitude of problems.

----------

Solved at long last!
Having tried everything except the bleedin' obvious, I tried the bleedin' obvious:

1. When restarting, hold down Cmd-R (ensure your are using a genuine Mac keyboard)..
2. Select the volume 'OSX Utilities' and boot up with this.
3. Select the 2nd option (rebuild the OS).

That's it; it'll take a while but it's totally automatic, you can go to bed.
All files untouched, bare minimum of OS and program upgrading (anyway all that is automated).
Nice one Apple! I have since found this sorts out a multitude of problems.

PS: This is with 10.8.2
Other Macs have the Utilities on DVD, memstick, wha'evah
 
Same problem, fixed with manual del of sleepimage

I had the same issues - handing on shutdown all the time - left it overnight and still turning that wheel.

Onyx didn't find any issues, but I had a nagging feeling about letfover sleepimages (missing too much space on the HD too).

From a terminal window

--------
cd /var/vm

sudo rm sleepimage
--------

Be careful. It's easy to mess things up.

No trouble shutting down now for me.

Good luck.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.