Handy Tricks
Sometimes you are running, and you get an error like this:
a.out(11233) malloc: *** error for object 0x100120: double free *** set a breakpoint in malloc_error_break to debug
Usually by the time you can react, your program has moved far past that. As suggested, you can set a breakpoint on malloc_error_break to catch the offending free().
Another even more common occurrence in Cocoa programming is this error:
2010-01-20 20:03:38.080 badmessage[11303:10b] *** -[NSCFArray frobulate:]: unrecognized selector sent to ...
Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.