Scrivener crashes after upgrading to El Capitan (OS X 10.11)
There is a bug in El Capitan that can cause crashes in 32-bit applications when they try to access font data. Because Scrivener is 32-bit, some of our users have reported frequent crashes when Scrivener is used after updating OS X to 10.11 El Capitan. These crashes often occur when Scrivener is launched, but sometimes they may occur while it is in use. Such crashes show the following text toward the beginning of the crash log:
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Note: EXC_CORPSE_NOTIFY
The crash log backtrace (the gobbledegook) may then contain something like the following:
- [NSConcreteMapTable objectForKey:] + [__NSFontTypefaceInfo typefaceInfoForPostscriptName:options:]
This OS X bug only occurs when the user account's global preferences are set to override certain font settings (it has been reported to Apple as bug ID#22869763, so hopefully they will fix it soon).
If you see crashes like this on El Capitan, then the first thing to do is to try to run Scrivener on a separate user account. If it launches and runs fine on another account, this indicates that something in the OS X updater process has caused problems with your main account that is interfering with Scrivener. (If Scrivener runs fine on another account, it narrows the problem down to your main account and ensures that it's not an unrelated bug in Scrivener.)
If you see these crashes, to get back up and running, please try the following steps:
- Open Terminal.app from the /Applications/Utilities
Type the following:
defaults delete .GlobalPreferences NSFont
Then either restart the computer or log out of your account and log back in again.
I have received a reply from Apple developer support regarding this bug. This was their response:
There are no plans to address this based on the following:
Changing NSFont is not supported.
We are now closing this report.
Presumably, users who are running into this bug have used some sort of tool in the past that has modified their .GlobalPreferences file to override the NSFont entry, and this causes crashes on El Capitan. But because this wasn't something supported officially, Apple has no interest in fixing it. Just to be clear, this is nothing to do with Scrivener but must have been caused by some other software used on the system in the past. Fortunately, the above fix should get users experiencing this issue up and running again.
This should work in most cases, but if you still see crashes, you'll need to go through the more complicated steps below:
- Create a second admin account if necessary. (You do this in the
"Users & Groups" pane of the System Preferences. When creating
the account, be sure to choose "Administrator" as the "New Account"
- Log out of your primary account. We will need to remove a
system preference file that is constantly open and written to while
you are logged in to that account.
- Log in to the second account and open Terminal.app from the
Copy and paste the following commands into Terminal and press return, one line at a time.
su - USERNAME
mv ~/Library/Preferences/.GlobalPreferences.plist ~/Desktop/old-GlobalPreferences.plist
On the first command you will be asked for the password to your primary account ("USERNAME" should be replaced with your short account name, what you see as the directory name for your account in the Users folder). Your shell session will now be running as the primary user, rather than the secondary account.
If you received no errors from either of those commands, then log back into the primary account and try to launch Scrivener.
You will want to go through the System Preference panels and make sure everything is set back to the way you prefer. If it worked, feel free to delete that "old-GlobalPreferences.plist" file off of your desktop.
If you still have problems, please contact us so that we can work through the issues with you.