Re: EXC_BAD_ACCESS in NSApplicationMain
Re: EXC_BAD_ACCESS in NSApplicationMain
- Subject: Re: EXC_BAD_ACCESS in NSApplicationMain
- From: Tito Ciuro <email@hidden>
- Date: Sun, 24 Jul 2011 19:55:00 -0300
Hi Joseph,
If you type 'bt' in GDB, do you see something like this by any chance?:
> #74 0x00007fff8686f312 in -[NSIBObjectData initWithCoder:] ()
> #75 0x00007fff827fbe73 in _decodeObjectBinary ()
> #76 0x00007fff827fb2ed in _decodeObject ()
> #77 0x00007fff8686ea41 in loadNib ()
> #78 0x00007fff8686dfa1 in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] ()
> #79 0x00007fff8686ddd9 in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
> #80 0x00007fff8686b35b in NSApplicationMain ()
> #81 0x0000000100011370 in main (argc=1, argv=0x7fff5fbff5c0) at main.m:13
> (gdb)
I started seeing this in Xcode 4.1 and 4.2 too.
-- Tito
On Jul 24, 2011, at 7:50 PM, Ayers, Joseph wrote:
> In XCode 4.1. and Lion,, compiling for OS X 10.6, My application is crashing in main.m. Specifically it exhibits EXC_BAD_ACCESS errors in main.m, NSApplicationMain and obj_msgSend on disassembly. I've got symbolic breakpoints at: “objc_exception_throw” and “[NSException raise]“.
>
> Any idea how to get beyond this?
>
> Thanks,
> Joseph
>
> main.m
>
> #import <Cocoa/Cocoa.h>
>
> int main(int argc, char *argv[])
> {
> return NSApplicationMain(argc, (const char **) argv); < Thread 1 EXC_BAD_ACCESS (code = 1, address = 0x553838b0)
> }
>
> Errors
>
> in objc_msgSend_disassembly_0x97876d54.s
>
> The offending line is
>
> 0x97876d54: movl 8(i,x,4), x < Thread 1 EXC_BAD_ACCESS (code = 1,
>
> in NSApplicationMain_disassembly_0x94cd58f3.s
>
> The offending line is:
>
> 0x94cd58f3: testb %al, %al < Thread 1 EXC_BAD_ACCESS (code = 1,
>
> in main.m, the offending line is:
>
> return NSApplicationMain(argc, (const char **) argv); < Thread 1 EXC_BAD_ACCESS (code = 1,
>
> argc = (int) 1
> argv = (char**) 0xbffffb18
>
>
>
> Joseph Ayers, Professor
> Department of Biology and
> Marine Science Center
> Northeastern University
> East Point, Nahant, MA 01908
> Phone (781) 581-7370 x309(office), x335(lab)
> Boston: 444 Richards Hall (617) 373-4044
> Cellular (617) 755-7523, FAX: (781) 581-6076
> Google Voice: (781) 346-9589
> eMail: email@hidden<mailto:email@hidden>
> iPhone: email@hidden<mailto:email@hidden>
> http://www.neurotechnology.neu.edu/
> http://robobees.seas.harvard.edu/
> http://cyberplasm.net/
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden