An example debugging session
Wil Shipley just posted a neat little description of a debugging session he did. It's a very nice example of the discrepancy between what you see of a bug and what actually causes it. In particular, his code crashes deep in Apple code, and I can't emphasize enough what he's saying:
Now, let me state something unequivocally: 98% of the time when you think you've found a bug that is not your fault, it really is your fault. The other 2% of the time... well, it's probably your fault as well.
Obviously, this generally also applies to APE haxies and SIMBL modules. It's your code that causes this, even if it is six miles away. And usually, there's a workaround that you can implement in your application. Wil could have just told the users to delete the corrupted cache. Instead he made his app do it for them. That way he can be sure that anyone who runs the fixed version can not get that crash.