Subscribe to
Posts
Comments
NSLog(); Header Image

Font Caches and Missing Aperture Menus

Today I launched Aperture to do some quick photo picking (you'll notice some new blog header images). The menus were blank. I had an Apple and nothing else. Though I could export (via the keyboard shortcut), none of the popup menus in the export panel even worked.

So I set about figuring out what was going wrong.

First I removed the Aperture items in my Preferences and Application Support folders. That didn't fix anything (so I restored them). Then I moved my Aperture library so it'd create a new one. Same problems.

I checked the console next - it listed "NSCTFontCharacter…" as an error, so I knew it was a font problem.

The error began like this:

12/17/07 10:11:28 pm Aperture[270] HIToolbox: ignoring exception 'Exception in Aperture: *** -[NSCFDictionary initWithObjects:forKeys:count:]: attempt to insert nil value at objects[0] (key: NSCTFontCharacterSetAttribute)
Backtrace:
0x000dde2f  (in Aperture)
0x9266ded7: +[NSException exceptionWithName:reason:userInfo:] (in CoreFoundation)
0x92668182: -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] (in CoreFoundation)
0x9266ae6a: +[NSDictionary dictionaryWithObject:forKey:] (in CoreFoundation)
0x006231bb  (in ProKit)
0x0062422f  (in ProKit)
:
:
0x95d1a6d1: -[NSApplication run] (in AppKit)
0x005af271  (in ProKit)
0x00003106  (in Aperture)
' that raised inside Carbon event dispatch

I was very cautious about doing all of this, but here's the general outline of the process I followed:

  1. Time Machine back to December 1. I know Aperture worked a few days after that. Restore all font folders. /System/Library/Fonts had no changes. /Library/Fonts had a few small changes. ~/Library/Fonts had a few changes.
  2. Activate all fonts.
  3. find duplicate fonts in ~/Library/Fonts/ and remove them. Do not, as Font Book will sometimes trick you into doing if you're not careful, remove them from /Library/Fonts.
  4. Validate the remaining fonts.
  5. Remove all fonts with warnings or errors from your ~/Library/Fonts/ folder (see prior warning).
  6. Delete the font cache.

It may have simply been the last step that did it, or maybe all the font shuffling and logging in and out had something to do with it, but I found this tip at Mac OS X Hints.com: sudo rm -rf /private/var/folders/*/*/-Caches-/com.apple.ATS. The location of font caches is different than before, and that code will remove them all. The tip says a reboot is necessary, but I simply logged out and back in and it seemed to work just fine.

I believe fairly strongly that everyone should check their fonts on occasion. Mac users tend to collect fonts, and it serves us well to validate them now and then to make sure they're not screwing things up. If you find and remove some bad fonts, I recommend clearing the caches and logging out.

P.S. And beware of Font Book. Sometimes its "delete" command moves ALL fonts to the trash. And then, well, you may as well use Time Machine and start all over. 😛

2 Responses to "Font Caches and Missing Aperture Menus"

  1. I read somewhere that this could be fixed by making sure the HiraKakuPro font is available.

    Edit [Erik]: Joe later pointed me at this discussions thread.

  2. Can confirm that turning off the

    HiraKakuPro font

    will make the Menu Bar not display any of the Aperture Specific menu bar titles missing.

    I had trimmed the amount of fonts using Font Book and was stymied until I turned the font back on.


Trackback URI | Comments RSS

Leave a Reply

Please abide by the comment policy. Valid HTML includes: <blockquote><p>, <em>, <strong>, <ul>, <ol>, and <a href>. Please use the "Quote Me" functionality to quote comments.