Seemingly random apps have a slash through their icons
My Mac hung overnight and was in a bad enough place that I had to power cycle it this morning. When it came back up, I logged in and found that a number of the apps in my dock had a slash through their icons. When I tried to launch them, a dialog came up informing me that they could not be run on my Mac.
I logged in as a different user, and these same apps worked fine. I also tried deleting and reinstalling some of them, and those apps were fine thereafter. However, some of the affected apps are stock applications that come with the OS (e.g. Terminal.app), so that's not a great solution.
Launching the apps from the command line works fine. I also found that zipping up the app package, deleting the original, and unzipping the copy seemed to get things working again.
My suspicion is that the Finder or another component has cached information about these apps, and that the cache has been corrupted. This would explain why things are fine for other users on the system. However, I don't know where that information might be stored. I've tried deleting the Finder preferences and the entire contents of ~/Library/Application Support/Caches to no avail.
Is there an easy way to get my account back to a good state, or am I stuck with manually fixing each app one at a time?
Update: Further testing has revealed that zipping and unzipping affected applications is not 100% reliable. Sometimes it works and sometimes it doesn't. Furthermore, sometimes merely moving/renaming an application is sufficient to get it back to normal, but sometimes that has no effect, either. This only makes me more interested in finding a real solution.
Solution 1:
If it is a cache problem then I would suggest running AppleJack to clear caches and fix permissions.
It's a wonder of a tool. It would be my first step.