Debugger halting in wrong place
Debugger halting in wrong place
- Subject: Debugger halting in wrong place
- From: Rick Mann <email@hidden>
- Date: Thu, 05 Apr 2012 12:05:38 -0700
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.
#0 0x012dddee in ___forwarding___ ()
#1 0x012ddcb2 in _CF_forwarding_prep_0 ()
#2 0x00cd3575 in NSKVOPendingNotificationCreate ()
#3 0x00cd33df in NSKeyValuePushPendingNotificationPerThread ()
#4 0x00cd2d63 in NSKeyValueWillChange ()
#5 0x00cb9185 in -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] ()
#6 0x00083d73 in _PF_ManagedObject_WillChangeValueForKeyIndex ()
#7 0x0008738e in _sharedIMPL_setvfk_core ()
#8 0x000a5cd7 in _svfk_14 ()
#9 0x00017372 in __block_global_0 at /Users/rmann/Yahoo/repo/iPadWeather/iPadWeather/WeathrUtils.m:118
#10 0x00cee63e in -[NSBlockOperation main] ()
#11 0x00ce71e7 in -[__NSOperationInternal start] ()
#12 0x00ce6eea in -[NSOperation start] ()
#13 0x00d770ad in __block_global_6 ()
#14 0x01fd5330 in _dispatch_call_block_and_release ()
#15 0x01fd7509 in _dispatch_main_queue_callback_4CF ()
#16 0x012ae803 in __CFRunLoopRun ()
#17 0x012add84 in CFRunLoopRunSpecific ()
#18 0x012adc9b in CFRunLoopRunInMode ()
#19 0x020317d8 in GSEventRunModal ()
#20 0x0203188a in GSEventRun ()
#21 0x003b0626 in UIApplicationMain ()
#22 0x000026dd in main at /Users/rmann/Yahoo/repo/iPadWeather/iPadWeather/main.m:16
#23 0x00002645 in start ()
I'll write this up in radar.
--
Rick
_______________________________________________
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