<p>During the load of my cocoa application, my program crashes with the messsage EXC_BAD_ACCESS.  The stack trace is not helpful.  Any clues to how I can find the problem?</p>

[{'answer_id': 64938, 'author': 'AlanKley', 'author_id': 8761, 'author_profile': 'https://Stackoverflow.com/users/8761', 'pm_score': -1, 'selected': False, 'text': "<p>This is one possible reason.  There is a IBOutlet object that isn't being initialized and a message is being invoked on nil.  The stack trace might look like this:</p>\n\n<pre><code>#0    0x90a594c7 in objc_msgSend\n#1    0xbffff7b8 in ??\n#2    0x932899d8 in loadNib\n#3    0x932893d9 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]\n#4    0x9328903a in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]\n#5    0x93288f7c in +[NSBundle(NSNibLoading) loadNibNamed:owner:]\n#6    0x93288cc3 in NSApplicationMain\n#7    0x00009f80 in main at main.mm:17\n</code></pre>\n\n<p>Since the stack trace is not helpful you will have to step through your code to find the error.  If for some reason you aren't able to set breakpoints early in your execution, try inserting some Debugger(); calls which will break to the debugger.</p>\n"}, {'answer_id': 66607, 'author': 'millenomi', 'author_id': 6061, 'author_profile': 'https://Stackoverflow.com/users/6061', 'pm_score': 0, 'selected': False, 'text': '<p>To add: the foremost reason for unarchiving failure is forgetting "return self;" from the -init of a custom class. It hurts a lot :(</p>\n'}, {'answer_id': 68025, 'author': 'crackity_jones', 'author_id': 1474, 'author_profile': 'https://Stackoverflow.com/users/1474', 'pm_score': 4, 'selected': True, 'text': "<p>I've seen times where this can happen when you are trying to access a object that you didn't retain properly so its either not pointing to a valid copy of your object or its pointing to an object of another type. Placing breakpoints early and analyzing the objects as you step through startup using po and print in gdb is your best bet.</p>\n"}, {'answer_id': 99107, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Check console log ( Applications/Utilities/Console.app ) . When program crashes on startup, and there's something wrong with initialization, it often writes out some helpful error messages there, before it crashes.</p>\n"}, {'answer_id': 209000, 'author': 'mmalc', 'author_id': 23233, 'author_profile': 'https://Stackoverflow.com/users/23233', 'pm_score': 2, 'selected': False, 'text': "<p>This is typically indicative of a memory management error.</p>\n\n<p>Make sure all your outlet declarations follow best practice:</p>\n\n<pre><code>@interface MyClass : MySuperclass {\n    UIClass *myOutlet;\n}\n@property (nonatomic, retain) IBOutlet UIClass *myOutlet;\n@end\n</code></pre>\n\n<p>This format ensures that you get memory management right on any platform with any superclass.</p>\n\n<p>Check any <code>awakeFromNib</code> methods to ensure that you're not over-releasing objects etc.</p>\n"}, {'answer_id': 8135570, 'author': 'Jonathan Moffatt', 'author_id': 45031, 'author_profile': 'https://Stackoverflow.com/users/45031', 'pm_score': 1, 'selected': False, 'text': '<p>A new answer to an old thread... in XCode 4 the most effective way to diagnose EXC_BAD_ACCESS exceptions is to use Instruments to profile your app (from XCode click Product/Profile and choose Zombies). This will help you identify messages sent to deallocated objects.</p>\n'}]
['https://Stackoverflow.com/questions/64881', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8761/']