Re: does this crash make sense to anyone?
Re: does this crash make sense to anyone?
- Subject: Re: does this crash make sense to anyone?
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 18 Dec 2008 11:49:38 -0800
On Thu, Dec 18, 2008 at 11:45 AM, Shawn Erickson <email@hidden> wrote:
> On Thu, Dec 18, 2008 at 11:33 AM, email@hidden
> <email@hidden> wrote:
>> Hi,
>>
>> my app keeps annoying me by crashing at launch every now and then.
>> What's weird about the backtrace is that it tells me I have called a
>> CLASS method named setFrame:. The class varies: in this case it says
>> NSClipView, sometimes is says NSAttributedString, or NSObject, or
>> whatever. Of course, I don't make any such calls explicitly, and most
>> of the time the app launches just fine. Any idea what the problem
>> could be, or how to locate it with gdb? I never learned using the
>> debugger properly.
>
> This is indicative of not correctly retaining an object (likely an
> object given to you that you then stick into an instance var without
> taking "ownership" of it) . As a result the object is deallocated out
> from under you (likely as a result of the currently auto release pool
> being drained) and then that slot in memory is randomly replaced with
> a different object instance likely of a totally unrelated class.
>
> You can use NSZombie to help isolate...
>
> http://developer.apple.com/technotes/tn2004/tn2124.html
I should note it could also be because you are releasing an object
that you shouldn't be releasing. Normally an over release would fail
in a different way (crash in a future release message) but it is
possible to get what you are seeing because of an over release in
addition to an under release situation.
If this is a GC using application then the issue will be different.
-Shawn
_______________________________________________
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