Friday, March 16, 2007

Troubleshooting application crashes in Mac OS X 10.4.x

What do you do when an application(s) in Mac OS X 10.4 start crashing? Before the Mac OS X 10.4.9 update, applications and processes were sometimes randomly crashing. How very Windows like? I thought at first this might have been a problem with Parallels 2.5 (Build 3188), because one of the OS X Parallels network daemons crashed, but then Safari went down a few times loading normal (aka not porn), and then Notes, but it wasn't edidemic really. Then I installed OS X 10.4.9 using Software Update, and crashes did become epidemic, user mode applications (Notes, Safari, etc.) were crashing and system processes like mdimport, mDNSresponder, lookupd, and a few others went down. Oh shit, 10.4.9 is horribly broken, Apple released this before it was ready, right! Not so much.

When that many apps are crashing, the most likely problems are file system structure corruption, physically memory is broken, or the OS files itself are not all on the correct version or corrupt. Since crashes started happening before 10.4.9, I knew that couldn't be the root cause, but since it got worse with 10.4.9, I theorized that when I updated to 10.4.9, a OS file mismatch or corruption was made worse because more files expected a newer version of some file(s) that were broken. Apple uses two forms of OS updates with OS X, delta and combo. Delta based updates apply only the changes between the immediate previous version of OS X, 10.4.8 in this case, and 10.4.9 to get you system up to date. Combo updates are used in all other cases, so if you were running 10.4.7 when 10.4.9 was released you get the Combo. A 10.4.9 system updated either delta or combo based should be identical. Why use one method over the other? Software Update automatically picks the method that it thinks is best based on your system, it should and does Just Work. What are the differences? To the end user, download size and convenience. Software Updates offers you an update, you take it, its either Delta or Combo. Combo is always larger than a Delta update. Other software updates, like security updates, are not flagged as either delta or combo, and given the size of those downloads, really why bother. John Gruber at Daring Fireball had some apt comments on this, and he recommends you just use the OS X update that Software Update gives you, and I agree. I installed 10.4.9 using the Delta update Software Update offered, so it looked to me that the Delta update didn't update a file I already had on my system that it thought was the correct version for 10.4.9, but which was broken.

I checked the file system and repaired permissions first, just in case, and some stuff was fixed, but my crash problems persisted. Then I installed the 10.4.9 Como update, and I haven't had a single crash of anything since, so I am pretty sure I am fixed! So what pre-10.4.9 update could have caused my problem?


After looking at the crash logs in Console.app for everything, I am pretty sure it was the above selected update, Security Update 2007-002, that was giving me problems. I am actually extremely thankful 10.4.9 was finally released because without it I woulddn't have had the Combo updater to solve this problem. In theory I could have reapplied the Seurity Update, if that's what is was, but the Combo update wiped out all my problems.