X

Mail crashing immediately every time it is opened

Though every now and then Mail may hang with the spinning color wheel (likely from network hang-ups), or crash when performing a specific action (such as loading a problematic e-mail message), there may be other instances where the program will crash immediately upon launch, and not allow for troubleshooting from within the program itself.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
3 min read

Though every now and then Mail may hang with the spinning color wheel (likely from network hang-ups), or crash when performing a specific action (such as loading a problematic e-mail message), there may be other instances where the program will crash immediately upon launch, and not allow for troubleshooting from within the program itself.

If the crashes happen in all user accounts, then either a global dependency such as WebKit or the application itself could be corrupted, though usually the problem occurs in specific user accounts. If this kind of crashing occurs, try the following to fix it:

  1. Launch Mail safely

    Many times when these crashes occur, it will be because of a problematic e-mail message causing the crash being loaded by default. The program will launch, and when the message viewer shows up the program will shut down with an unexpected error. This can usually be better determined by launching Mail then immediately holding down the Shift key, which will prevent messages or mailbox contents from being loaded when the program launches.

    If this works, try selecting each mailbox and rebuilding it using the "Rebuild" option in the "Mailboxes" menu. Additionally, you can test certain messages to see if they are contributing to the problem, and if so, be able to target them for deletion without loading them.

  2. Try clearing property lists

    As with many applications, if the preferences file for Mail is corrupted, then odd behavior including crashes could result. This would require you to remove the preferences file and have Mail generate a new one. Unfortunately your account settings and other customizations will be lost and will need to be re-entered; however, your downloaded messages and mailbox organization will remain intact.

  3. New or updated plugin?

    If you have any plug-ins for Mail, try removing them and relaunching the program. These can be anything from attachment handlers, to spam filters, to service enhancers or notification managers.

  4. Rebuild Address Book database

    One additional problem that recently came to light in an Apple Discussion thread is that these kind of crashes could be because of corruption in the Address Book database. To find this out, look at the crash report associated with Mail to see if there are lines similar to the following:

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -NSCFDictionary setObject:forKey:: attempt to insert nil value (key: Unique ID)


    10 com.apple.CoreFoundation  0x00007fff8038ab47 +NSException raise:format:arguments: + 103
    11 com.apple.CoreFoundation  0x00007fff8038aad4 +NSException raise:format: + 148
    12 com.apple.Foundation  0x00007fff851b5ad7 -NSCFDictionary setObject:forKey: + 227
    13 ...apple.AddressBook.framework  0x00007fff8434dc47 -ABRecord nts_DescriptionDictionary + 832
    14 ...apple.AddressBook.framework  0x00007fff8434d5b6 -ABRecord nts_Description + 39
    15 ...apple.AddressBook.framework  0x00007fff8434bdb1 -ABRecord description + 67
    

    If these lines referencing the CoreFoundation's "NSCFDictionary" function and AddressBook's "ABRecord" function are present in the crashed thread, then it is likely that the Address Book database is corrupt and will not allow Mail to properly access what it needs to fulfill the requirements for the NCSFDictionary function, causing Mail to crash.

    If this is the case, try launching Address Book and make small edits to your contact entries (such as adding and removing a space character) to have the database be refreshed by having all entries rewritten. Hopefully this will fix the problem, but if it doesn't then you may have to rebuild the Address Book. To do this, first back up your Address Book by selecting the "All Contacts" group and then choosing the "Address Book Archive" option from the "File → Export" menus.

    When the contacts are saved, quit Address Book and go to the /username/Library/Application Support/Address Book/ folder and remove the contents of this folder (do not delete them, just move them to the Desktop). Then launch Address Book again. The contacts should still be there, but if not then you can import them from your saved archive backup.

    Once this is done, try launching Mail again.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.