Reputation: 143905
I managed to successfully silence the CrashReport dialog, but when my application crashes and I restart it, I get the annoying dialog as from Title. Is there a way to prevent it to appear, and just let the application run without interruption?
Upvotes: 13
Views: 16570
Reputation: 89
For those trying to accomplish this
defaults write -app "Application Name" NSQuitAlwaysKeepsWindows -bool false
with Python, you may get the error Couldn't find an application named "Python"; defaults unchanged
.
To solve this, repeat the process to get the "reopen windows?" pop-up again, but do not choose an option in the pop-up – leave it alone for now. Right-click on the Python application's icon on the dock and choose "Show in Finder". Right-click on the application icon within Finder, hold the option key, and click Copy "Python" as pathname"
. Paste that in as the "Application Name" for the command above and it should work.
Upvotes: 1
Reputation: 11
Voila! I've just solved this problem by deleting all Unity-related files inside ~Library/Caches folder on my Mac!
Upvotes: 1
Reputation: 11
I was having a similar problem with google chrome and I could solve it by reading the following link:
https://support.google.com/chrome/thread/22716083?hl=en
Drew Z recommends the following solution there which worked for me:
- In the Mac menu bar at the top of the screen, click Go.
- Select Go to Folder.
- Enter ~/Library/Application Support/Google/Chrome/ in the text field, then press Go.
- Locate the folder called "Default" in the directory window that opens and rename it as "Backup default."
- Try opening Google Chrome again. A new "Default" folder is automatically created as you start using the browser.
Upvotes: 1
Reputation: 3025
You can disable this for a specific Xcode scheme by going to Edit Scheme, choosing the Options tab, and checking the box labeled "Launch application without state restoration."
However, this will only apply when you actually launch the application from Xcode; it won't disable the dialog when launching by double-clicking in Finder, or when launching from the terminal.
(As best I can tell, there no way for AppKit/NSApplication-based apps to do what UIKit apps can do with UIApplicationDelegate's application:shouldRestoreApplicationState:
and disable persistent state entirely for the application.)
Upvotes: 0
Reputation: 23035
Try this to get rid of the reopening windows:
defaults write -app "Application Name" NSQuitAlwaysKeepsWindows -bool false
You may also disable it for every application by selecting this option in the preferences: "Close windows when quitting an application"
And for others reading this thread, to remove the CrashReport do this:
defaults write com.apple.CrashReporter DialogType none
Also note that in the source of this information they say:
For this to work one needs to check the box, open the program in question and immediately close it. On the next re-opening it will work without Resume.
You may also have to delete:
/Users/…/Library/Saved\ Application\ State/org.python.python.savedState/
Upvotes: 23