Error message com.apple.Safari.History was closed unexpectedly
Since updating to Max OS 10.11.6 this morning I've seen this message several times. It's a bit weird as I never use Safari. I suspect it might be something to do with the AppStore trying to update. Any ideas on how I can stop this?
From the report that this generates it's clear that Spotlight is the culprit (thanks Dmitri for pointing this out)
Process: com.apple.Safari.History [4881]
Path: /System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/XPCServices/com.apple.Safari.History.xpc/Contents/MacOS/com.apple.Safari.History
Identifier: com.apple.Safari.History
Version: 11601 (11601.7.1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Spotlight [464]
User ID: 501
It's because of Spotlight. Whenever you do a Spotlight search, apparently some Safari history search framework is loaded in the background, and this now crashes because some symbol was not found:
Dyld Error Message:
Symbol not found: _initializeSandbox
Referenced from: /System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/XPCServices/com.apple.Safari.History.xpc/Contents/MacOS/com.apple.Safari.History
Expected in: /System/Library/StagedFrameworks/Safari/SafariShared.framework/Versions/A/SafariShared
This is a bit of a bummer, it makes Spotlight mostly unusable.
P.S. 2016-12-16: I had reported the bug to Apple, and they have now closed it as a duplicate, so they have at least received multiple identical reports. Let's hope it gets fixed soon.
P.S. 2017-01-24: Safari 10.0.3 has been released as a security update (see https://support.apple.com/en-us/HT207484), but it also resolves this particular crash, at least for me. It would be nice if somebody else can also confirm that.
Folks, I have a workaround doing ok on an iMac 5k with 10.11.6 with the latest update and the same error.
I open System Preferences - Spotlight and un-check "Bookmark & History". Then quit Safari. Again open System Preferences - Spotlight and check "Bookmark & History". Try a spotlight search. For me it worked. I also could start Safari again and the error does not come back.
BUT the error is back after restart, maybe also after hibernating (did not test yet).
Maybe the workaround works for you as well until there is a fix.
By the way, letting spotlight create a whole new index did not help, so likely you can spare that try.
Cheers Sepp