MacOS – Mail, Contacts & Calendars crashes System Preferences; iCal and Mail also affected

accountsemailicalmacossystem-prefs

When I open System Preferences and click the Mail, Contacts and Calendars icon, System Preferences crashes. In addition, iCal crashes on launch and Mail crashes when I try to open its preferences. This just started happening today. I haven't recently installed any new software or any OS updates. I'm running the latest version of Lion with all available system updates installed.

In all cases, the crash logs indicate that the crashing thread bombed out on the same call. Here's an example, the top few lines from the stack trace on the crashing thread from a System Preferences crash.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00000001007e3a22 CFStringGetLength + 18
1   com.apple.CoreFoundation        0x00000001007fb049 CFStringCompareWithOptionsAndLocale + 73
2   com.apple.AOSAccounts           0x000000011282d09c SaveAccountInfo(__CFString const*, __CFArray*, __CFDictionary*) + 218
3   com.apple.AOSAccounts           0x000000011282e624 ParseAccountInfo(__CFString const*, __CFString const*, __CFDictionary const*) + 1439
4   com.apple.AOSAccounts           0x000000011282e699 RefreshAccount + 65
5   com.apple.AOSAccounts           0x00000001128301fa ServiceProviderManager::LoadAccountProviders(__CFString const*) + 60
6   com.apple.AOSAccounts           0x00000001128306d2 ServiceProviderManager::Login(__CFString const*, __CFString const*, bool) + 76
7   com.apple.AOSUI                 0x00000001127a9158 -[MMAccountMgr init] + 577
8   com.apple.AOSUI                 0x00000001127a85cb +[MMAccountMgr sharedMgr] + 53

In all cases, I'm seeing the crash coming from within SaveAccountInfo from com.apple.AOSAccounts.

Stuff I've tried:

  • Repairing disk permissions (since it smells like one of those "some config file inadvertently became read-only" errors) – didn't help.
  • Deleting caches and mail- and calendar-related preference files – didn't help.

It seems as though if I could figure out where the AOSAccount code is storing its config data I could just blow that away, restart and re-enter my account details, but I've no idea where that stuff lives. Any ideas?

Update: this bug has been reported to Apple – radr://10636431 if you're at Apple and have Radar access.

Best Answer

Nailed it! In my case, I resolved this by deleting:

  • /Users/simon/Library/Preferences/MobileMeAccounts.plist
  • /Users/simon/Library/Preferences/MobileMeAccounts.plist.7gmTk7L
  • /Users/simon/Library/Preferences/MobileMeAccounts.plist.lockfile