12

I have strange problem, my Preview app is not responding and can't kill it.

enter image description here

leo-mac:~ leo$ sudo killall Preview
No matching processes were found

Force Quit button also doesn't give any result.

ps (and Activity Monitor) is empty:

leo-mac:~ leo$ ps -ax | grep -i preview
24793 ttys000    0:00.00 grep -i preview

It's not a zombie because next command is also empty:

ps aux | awk '"[Zz]" ~ $8 { printf("%s, PID = %d\n", $8, $2); }'

I really can't understand what happened. Any ideas?

Leo
  • 223
  • Does Preview return after logging out or restarting? – Graham Miln May 22 '15 at 08:29
  • 2
    Does the problem continue after quitting the Dock process? – Graham Miln May 22 '15 at 08:30
  • @GrahamMiln, restarting helps me, however, I'm afraid this situation can repeat. I think problem is with some broken doc but I can't find out, which document it is. – Leo May 22 '15 at 14:21
  • Are any Preview.app windows visible on screen when this happens – or is it only listed in the Dock? – Graham Miln May 22 '15 at 14:51
  • @GrahamMiln, only Dock. No windows, no top bar menu – Leo May 22 '15 at 15:42
  • Have you tried to send the kill signal (-s 9) when using kill? The normal signal tells the process to quit graceful - the KILL signal kills it. So 'kill -s9 24739' could work. – Rainer May 24 '15 at 11:57
  • 1
    I had partial success after killing "launchservicesd". The app would work again for the session, but a restart was still problematic and timed out. – Redarm May 24 '15 at 13:37
  • @Redarm, problem is that kill can't find preview by name (No matching processes were found) and Activity Monitor is also empty. Thanks, I will try to kill launchservicesd in the next time – Leo May 24 '15 at 17:30
  • Yes, I know. I've seen this, or similar behaviour with several different apps. Also sometimes trying to open a recently opened document from its Dock icon, makes a pop-up appear, mentioning "The application "<app_name>" is not open any more." Quitting 'launchservicesd' made it usable again, but it still cancelled a restart. – Redarm May 24 '15 at 18:26
  • Just a thought: how much space (of what capacity) is free on your system disk? From my experience, low disk space tends to create strange phenomena like stuck processes. – myhd May 26 '15 at 21:42

3 Answers3

20

I had the same problem. Workaround:

sudo killall launchservicesd
sudo killall Dock
nohillside
  • 100,768
matt
  • 314
2

It could be an issue with one of the files preview is attempting to open.

Go to

~/Library/Saved Application State/

Remove the com.Apple.Preview folder. This should resolve the issue when attempting to launch Preview after quitting the application from the above answer or shutting down.

fingaz
  • 321
0

I'm running OS X 10.11 "El Capitan" on my Macbook Pro, and I'm experiencing this issue with Mozilla Firefox. Unfortunately, in my case the commands sudo killall launchservicesd and sudo killall Dock aren't working this problem out: after I do this, I still can't e.g. reboot the operating system.

I found that the following command works:

sudo shutdown -r now

If your user account has administrative privileges on OS X, running the above command on Terminal will force OS X to reboot. Unfortunately, this is not a solution for the issue, but as a "last resource workaround" it works like a charm.

nohillside
  • 100,768