GDB:Program received signal: “EXC_BAD_ACCESS”. and point on objc_msgSend

Discussion in 'Mac Programming' started by mkristain, Sep 6, 2011.

  1. mkristain macrumors regular

    Aug 18, 2011
    i dont knw y this happen but some times when i run my app this problem is occur.

    #0	0x9759aee4 in objc_msgSend
    #1	0x0013a6c0 in ??
    #2	0x95844c6d in _CFAutoreleasePoolPop
    #3	0x989aef82 in NSPopAutoreleasePool
    #4	0x9208921d in loadNib
    #5	0x920885ed in +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:]
    #6	0x920884fe in +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:]
    #7	0x92088449 in +[NSBundle(NSNibLoading) loadNibNamed:owner:]
    #8	0x9208524d in NSApplicationMain
    #9	0x000020c8 in main at main.m:16
    in obj_msgSend point on this line 
    0x9759aee4  <+0036>  mov    0x8(%edi,%edx,4),%eax
    i really don't understand what is happen.

    please help me short out this.
  2. cbougher macrumors member

    Oct 19, 2006
    Atlanta, GA
    I believe this usually happens when you over release an object.

    Look to see if you are releasing an object that is already autoreleased.

    Maybe posting some code will help...
  3. gnasher729 macrumors P6


    Nov 25, 2005
    Go to
    Enter "memory management" into the search box.

    Click on the first link. Then read everything you find until you understand it completely. You have not the slightest chance of writing Cocoa code doesn't crash all over the place if you don't understand what these documents tell you. Ask questions if there is something you don't understand.

    Once you understand memory management, it is obvious what's the cause of objc_msgSend crashing when an autorelease pool is deallocated, so you just look for the place where your code is wrong and fix it. If this paragraph doesn't make sense to you then go back to the bit where you need to read the memory management documentation.
  4. Sydde macrumors 68020


    Aug 17, 2009
    No, there is probably a bug in one of the -awakeFromNib methods.
  5. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Post your code.
  6. mkristain thread starter macrumors regular

    Aug 18, 2011

Share This Page