• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EXC_BAD_ACCESS in _class_changeInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EXC_BAD_ACCESS in _class_changeInfo


  • Subject: Re: EXC_BAD_ACCESS in _class_changeInfo
  • From: Greg Parker <email@hidden>
  • Date: Tue, 3 Mar 2009 08:04:28 -0800


On Mar 2, 2009, at 9:22 PM, Dave DeLong wrote:

Hey everyone,

I've just come across something that I'm totally lost on.

I've got an app that I'm making that uses the Flying Meat database system (this may or may not be relevant; I have no idea), a couple static arrays[], and an "EditMyTeamsViewController".

When I call:

EditMyTeamsViewController * editMyTeams = [[EditMyTeamsViewController alloc] init];

I get an EXC_BAD_ACCESS on line 11 of the assembly in _class_changeInfo (presumably in the runtime): 0x941e6d4a <+0022> mov 0x10(íx),êx (in case you really wanted to know)

The stacktrace is:
_class_changeInfo
_class_setInitialized
_class_initialize
_class_lookupMethodAndLoadCache
_objc_msgSend
[MyCallingClass callingMethod]

I have verified that the result of the +alloc call is non-nil, but other than that I have no clue how to begin debugging this.

Most likely, you've sent a message to an invalid object, or to a valid object that was mangled by a memory error elsewhere. Usually that will crash inside objc_msgSend() itself, but if your bogus object happens to include dereferenceable pointers in the right places then the Objective-C runtime will happily traverse the "object" and "isa" and "method cache" and "class info" and finally fall over somewhere like the +initialize machinery as seen here.


Debug it as if it had crashed in objc_msgSend() itself. Make sure the memory management of the receiver is good, and if it is then look for other memory errors that might have clobbered it. NSZombie and Guard Malloc are probably your new best friends.


-- Greg Parker email@hidden Runtime Wrangler


_______________________________________________

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


  • Follow-Ups:
    • Re: EXC_BAD_ACCESS in _class_changeInfo
      • From: Dave DeLong <email@hidden>
References: 
 >EXC_BAD_ACCESS in _class_changeInfo (From: Dave DeLong <email@hidden>)

  • Prev by Date: Re: float from NSData
  • Next by Date: Re: float from NSData
  • Previous by thread: EXC_BAD_ACCESS in _class_changeInfo
  • Next by thread: Re: EXC_BAD_ACCESS in _class_changeInfo
  • Index(es):
    • Date
    • Thread