X

When force quit doesn't work

Alternatives, preventive measures.

CNET staff
4 min read

Mac OS X's force quit mechanism can be a boon when an applications freezes,

often consuming a large amount of system resources as it flails. However, force quits do not always execute properly, leaving hung or stalled applications in their problematic states.

As described by user Jude Kim on the Apple Discussion boards:

"After an application hangs forever, I tried to force quit. I get the message popup window saying that the application has been forced quit unexpectedly or something like that. But even after that message, there's still a blue light under the application. I can't restart the application and most annoyingly, I can't shut down the computer unless I shut it off with the power switch. I had this problem since I got this computer, please help me."

Fortunately, Apple's "Force Quit" dialogue box is only one of the many ways to approach targeting a process to kill it. Alternative Approaches include:

Activity Monitor Use Activity Monitor to display a list of all the running processes on the computer. You can see if one is displayed improperly or if it's using up large amounts of resources, and then kill it specifically to see if that clears the hang. (see this article for more)

The Terminal Use the terminal to kill a process by PID (Process ID). The PID can be looked up several ways, but the most common are to use Activity Monitor or the command line equivalent "top". Using the command line is a more basic approach to killing the process.

In some cases -- in which a single application causes the Mac OS X kernel to become extremely busy and slows the system to a halt -- having a Terminal window open can prove beneficial.

If you are lucky enough to have a Terminal window open, and can switch to it, you can kill processes that you otherwise would not be able to (since it's virtually impossible to launch Activity Viewer or the Terminal after a thrashing -- freezing -- process starts).

When the freeze ensues, switch to the Terminal window then type the following command:

top

and press return.

You'll be presented with a list of currently running processes. Scan down the "COMMAND" column for Safari (or whatever application is causing the issue) and note the number next to it in the "PID" column. Once you've found the PID, press the Q key to exit the top program, then enter the following command, replacing (PID) with the actual number -- without parentheses:

kill (PID)

and press return.

With any luck, the thrashing will stop and you'll be able to re-grain control of the computer -- or at least gain enough responsiveness to access and save currently open work.

Force shutdown If things get worse and you need to force a shutdown of the whole system, try the following: Instead of using the Finder's menus to shut down, try using the terminal to issue the shutdown command. Open it and type "shutdown -h now" (or "shutdown -r now" for a reboot).

Preventative Measures

Since the problem seems to occur for specific programs, that indicates the problem may lie with the program or some of it's resources. Many times a preferences file or other resource could get corrupted so the program has a hard time reading it.

Try removing the program's .plist file and restart the program. Such .plist files will generally be located in the ~/Library/Preferences folder, and labeled as follows:

  • com.(name of developer).(name of product).plist [For instance, com.adobe.Reader7.0.plist for Adobe Reader 7.0].

Simply drag the potentially offending .plist file to the trash, re-launch the hampered application, and check for continuation of problems. In some cases, applications will have several .plist files, so make sure you check for any that contain the product name. Also, note that you may lose some settings or other personal data used by specific applications when these files are deleted

You can also use Spotlight to find other files the program has created in your user library folder, and remove or delete them. Note that doing this most likely will get rid of your personal settings for the program, but most of the time re-entering them in the program's settings will set things up properly again. Additionally, this is only safe for applications that are bundled in one package. Many complex programs put vital items all over the place when they install, and removing them could break the program or reduce its functionality. - if the program has built-in maintenance tools, run them. For instance, Safari has a "Reset Safari" feature that clears caches, cookies, history, and preferences.

Finally, you can remove and reinstall the whole program. Hopefully the program came with an uninstaller script or utility. If not, you can use AppZapper which helps target a particular application's installed resources for easy removal.

Note that an application can hang for multiple reasons, and unfortunately it isn't always the program itself that's the problem. For instance, OS X has an automatic spell checker that's accessed by many programs. If something goes wrong with the spell checker, then any program that accesses the spell checker may hang along with the spell checker.

Feedback? Late-breakers@macfixit.com.

Resources

  • Jude Kim
  • this article
  • AppZapper
  • Late-breakers@macfixit.com
  • More from Late-Breakers