Re: Debugger halting in wrong place
Re: Debugger halting in wrong place
- Subject: Re: Debugger halting in wrong place
- From: Fritz Anderson <email@hidden>
- Date: Thu, 05 Apr 2012 14:32:00 -0500
On 5 Apr 2012, at 2:05 PM, Rick Mann wrote:
> I've chased down a crashing bug and determined that the debugger (both GDB and LLDB) are showing the crash in the wrong place. I wonder if they can be improved to be more accurate.
>
> In this case, I'm setting a dynamic property on an NSManagedObject subclass. A view class is using KVO to observe that property, but is getting dealloced beforehand.
>
> The debugger stops on the setter, shows EXC_BAD_ACCESS, and has two more frames in the stack (it's stopped on frame 9 here). I didn't realize I wasn't showing the entire stack, and puzzled over this for hours. Frames 7 - 1 were hidden.
>
> Had the debugger stopped on frame #2 and showed those neighboring frames, it would've been immediately obvious what was going on.
I assume you're already aware of the slider at the bottom of the Debug navigator, which filters the stack trace?
When it's all the way to the left, the whole trace is shown. Somewhere toward the middle, it shows only the frames immediately surrounding your code and the site of the crash, on the theory that you don't usually care about how execution was crawling around in code you can't fix. All the way to the right, it filters almost everything, which is useless.
— F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden