September 2008 Archives

iTunes 8 Update

| No Comments

I’ve just done the iTunes 8 update along with the QuickTime and other updates listed and found that OS X had a problem starting up afterwards. Anyway, I’ve tracked down the problem to it being a corrupted /etc/authorization file. Restoring this file fixes the problem. I’m not 100% sure it wasn’t something else I was doing that caused this but thought I’d post in case someone else encounters the problem.

Update: I thought I might explain how I figured out it was the /etc/authorization file was corrupt since you could use the same techniques to debug other start up issues.

The first thing I did was to boot up from another drive and run Disk Utility: no problems. Then I had a look at the system.log file in /var/log/. It showed a bunch of errors but the first one indicated that securityd had crashed. The crash log (stored in /Library/Logs/CrashReporter/) showed a crash in CFDictionaryContainsKey which got me thinking it was a problem with a property list file somewhere. To figure out which property list file, I booted the system in single user mode (Command-S) and typed:

    mount -uw /
    fs_usage >/var/log/fs-usage &

and then:

    exit

to continue booting. After rebooting into a working system, I was able to examine the /var/log/fs-usage file. I looked for the last thing that securityd did before it crashed and that was to read /etc/authorization and sure enough the file was garbage when I looked at it.

Table Views with Variable Row Heights

| No Comments

NSTableView allows you to have variable row heights in Leopard but here’s some code (MIT license) that will work back to 10.3. It works around a few awkward issues in Tiger and earlier that I suspect are fixed in Leopard.