In this chapter, you learn ways to react to application and system crashes and ways to be proactive about virus protection. You also learn to use your Mac OS X installation DVD to reset your password and, in times of widespread system failure, to reinstall your operating system.

Application Crashes

Sometimes, out of the blue, the application you're trying to use freezes up or disappears altogether. These events are commonly referred to as crashes.

Did you Know?

If you experience a lot of crashes in a specific application, you might want to see whether you can download a software update from the developer's website—frequently, software companies release a free patch to correct an instability problem. In addition, preference files associated with an application are sometimes corrupted, which can cause an application to operate erratically—such as when an application simply won't run, even if you're hardly doing anything that requires machine effort. If a preference file is causing a problem, you can correct it by deleting the file from your computer and resetting your preferences. Typically, preference files are stored in the systemwide Library folder inside another folder called Preferences.

Application Unexpectedly Quits

One of the more common kinds of crashes involves an application quitting. Suddenly, without warning, the document window disappears from the screen, and you see a message similar to the one shown in Figure 31.1.

Figure 31.1 This unfriendly message might sometimes appear when you're working in an application.

By the Way

Unfortunately, when a program quits while you're working on a document, all the work you've done since the last time it was saved is gone—unless the application has a recovery feature that automatically saves, such as Microsoft Word. For that reason, get in the habit of saving your documents often so that you don't lose much if something goes wrong.

Mac OS X is designed to be stable despite localized problems with applications, so if one application unexpectedly quits, you can continue to work in others without having to restart.

Force Quit

Not all crashes cause an application to quit. Sometimes the application just stops running. The mouse might freeze, or it might move around but not do anything.

By the Way

Sometimes an application appears to be unresponsive because it is in the middle of a resource-intensive task. The keyboard shortcut Command-. (period) can be used to interrupt active processes in some applications to return your system to your control. If an application isn't responding because it's busy, you might want to try this command, or let the application finish its task, instead of force-quitting it—just be sure that the application you want to interrupt is the one you have selected.

If this happens, follow these steps to force quit the application so that you can restart it:

Watch Out!

If you must force quit an application, you lose unsaved changes because the application is not functioning well enough to save. Yet another reason to save often!

From the Finder, press the Command-Option-Esc keys simultaneously, or choose Force Quit from the Apple menu. A window appears containing a list of applications you can force quit, as shown in Figure 31.2.

Normally, the application you were just running is selected. If not, select the application in the list.

Click Force Quit. Over the next few seconds, Mac OS X should make the program quit. If it fails to occur, try again. Sometimes it takes two tries for the system to get the message.

If the program really doesn't quit, go to the Apple menu and choose Restart. At this point, there might be systemwide instability, and it doesn't hurt to restart the entire system.

By the Way

A kernel panic is an occasional Mac OS X system error. When this type of error occurs, instructions in several languages to restart your computer appear onscreen. Use the instructions in the "System Crashes" section, next, to force a system restart.