Suppressing the "unexpectedly quit" alert

Q: How can I suppress the "The application <application> has unexpectedly quit" alert?

A: You can suppress this alert by modifying CrashReporter's modes of operation. CrashReporter has three modes of operation: Basic, Developer, and Server. See Technical Note TN2123 CrashReporter for a description of these modes. Use the CrashReporterPrefs or Terminal application to change these modes of operation.

Note: Prior to Mac OS X 10.4, the Basic, Developer, and Server modes were respectively known as prompt, crashreport, and none.

  • CrashReporterPrefs - This application was introduced with Mac OS X 10.4 (Xcode 2.0). It is part of the developer tools (/Developer/Applications/Utilities/CrashReporterPrefs.app). Launch CrashReporterPrefs to select a mode of operation.

  • Terminal - Type the following command in the Terminal window to choose a mode of operation :

    defaults write com.apple.CrashReporter DialogType <mode>

    where <mode> represents one of the three operating modes.

    Once modified, DialogType will be written to ~/Library/Preferences/com.apple.CrashReporter.plist.

Use the CFPreferencesSetAppValue function to programmatically modify CrashReporter's modes of operation. See Listing 1 for an example of programmatically suppressing the "The application <application> has unexpectedly quit" alert; this example sets DialogType to Developer.

Listing 1: Programmatically suppressing the alert dialog.


CFStringRef key = CFSTR("DialogType");
CFStringRef value = CFSTR("Developer");
CFStringRef appID = CFSTR("com.apple.CrashReporter");

CFPreferencesSetAppValue(key, value, appID);

Note: You can only suppress the "The application <application> has unexpectedly quit" alert for applications that are launched after DialogType is set. Hence, you should close any running applications before modifying DialogType or restart them after modifying it.

Further Reading

Back to Top 

Document Revision History

DateNotes
2008-03-11Updated content for Mac OS X 10.4 and 10.5. Fixed a typographical error. "~Library/Preferences/com.apple.CrashReporter.plist" should be "~/Library/Preferences/com.apple.CrashReporter.plist."
2003-10-10Describes how to suppress the "unexpectedly quit" alert.

Posted: 2008-03-11


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.