MacOS – SystemUIServer and other processes crash repeatedly on login

macos

I don't know what I did wrong (it could have been related to rebuilding the Launch Services database), but yesterday after I restarted, multiple processes (like SystemUIServer, NotificationCenter, Alfred, and TextEdit) kept crashing on launch or repeatedly. The Notification Center icon and other icons on the right side of the menu bar kept disappearing. I couldn't make Time Machine backups either. When I tried making another account, it had the same issues, and text in the UI was shown as characters from the LastResort font.

system.log contained repeating messages like this:

Feb 23 17:29:59 Lauris-iMac com.apple.launchd.peruser.501[131] (com.apple.mdworker.shared.04000000-0000-0000-0000-000000000000[1545]): Job appears to have crashed: Segmentation fault: 11
Feb 23 17:30:09 Lauris-iMac.local SystemUIServer[1543]: *** Assertion failure in -[MDFileTypeImageCache setImage:forKey:timeToLive:], /SourceCache/SpotlightUI/Spotlight-707.3/menu/Application/MDImageMemoryCache.m:268
Feb 23 17:30:09 Lauris-iMac.local SystemUIServer[1543]: image should not be nil
Feb 23 17:30:20 Lauris-iMac.local NotificationCenter[1567]: registering /System/Library/Fonts/*, /System/Library/Fonts/Base/*, and /Library/Fonts/* locally
Feb 23 17:30:21 Lauris-iMac com.apple.launchd.peruser.501[131] (com.apple.notificationcenterui.agent[1567]): Job appears to have crashed: Segmentation fault: 11

I tried deleting {~,}/Library/Caches/ and /var/folders/, repairing permissions from the recovery partition, starting up in safe mode, and running sudo atsutil databases -remove and sudo mdutil -E /. I think I solved it by just reinstalling OS X, but in case it happens again, does anyone have better suggestions?

Best Answer

So I ended up just starting up from the recovery partition and reinstalling OS X.

The Reinstall Mac OS X option is like upgrading from 10.7 to 10.8: it could just as well be called something like repair OS X. I only had to reinstall Java, replace Apache configuration files, and so on.