Why I hate tail-call optimizations
Error message:
2010-03-11 11:51:56.632 Kobov3[86857:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFArray insertObject:atIndex:]: attempt to insert nil'
Backtrace:
#0 0x02de2de4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
#1 0x90da8509 in objc_exception_throw ()
#2 0x00117046 in __NSThreadPerformPerform ()
#3 0x02d325fa in CFRunLoopRunSpecific ()
#4 0x02d32048 in CFRunLoopRunInMode ()
#5 0x032fa89d in GSEventRunModal ()
#6 0x032fa962 in GSEventRun ()
#7 0x0038fae5 in UIApplicationMain ()
Neither -[NSArray insertObject:atIndex:] nor any of my code is in the stack backtrace. Well, that’s helpful.
*sigh*