【发布时间】:2014-11-13 02:20:59
【问题描述】:
我在 xcode 中运行我的代码后收到消息“线程 1:断点 1.1”,我认为这是指我添加的异常断点“所有异常”。 “线程 1:断点 1.1”以绿色突出显示我的主文件中的线程
return UIApplicationMain(argc, argv, nil, NSStringFromClass([CardGameAppDelegate class]));
我的调试器控制台只显示“(lldb)”。在控制台中运行 'bt'(回溯)后,返回的内容如下:
* thread #1: tid = 0x1b2bb4, 0x015748b9 libobjc.A.dylib`objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
frame #0: 0x015748b9 libobjc.A.dylib`objc_exception_throw
frame #1: 0x01884fe1 CoreFoundation`-[NSException raise] + 17
frame #2: 0x01234d9e Foundation`-[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
frame #3: 0x011a11d7 Foundation`_NSSetUsingKeyValueSetter + 88
frame #4: 0x011a0731 Foundation`-[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
frame #5: 0x01202b0a Foundation`-[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
frame #6: 0x004eb1f4 UIKit`-[UIRuntimeOutletConnection connect] + 106
frame #7: 0x015867de libobjc.A.dylib`-[NSObject performSelector:] + 62
frame #8: 0x017f076a CoreFoundation`-[NSArray makeObjectsPerformSelector:] + 314
frame #9: 0x004e9d4d UIKit`-[UINib instantiateWithOwner:options:] + 1417
frame #10: 0x003526f5 UIKit`-[UIViewController _loadViewFromNibNamed:bundle:] + 280
frame #11: 0x00352e9d UIKit`-[UIViewController loadView] + 302
frame #12: 0x003530d3 UIKit`-[UIViewController loadViewIfRequired] + 78
frame #13: 0x003535d9 UIKit`-[UIViewController view] + 35
frame #14: 0x00273267 UIKit`-[UIWindow addRootViewControllerViewIfPossible] + 66
frame #15: 0x002735ef UIKit`-[UIWindow _setHidden:forced:] + 312
frame #16: 0x0027386b UIKit`-[UIWindow _orderFrontWithoutMakingKey] + 49
frame #17: 0x0027e3c8 UIKit`-[UIWindow makeKeyAndVisible] + 65
frame #18: 0x0022ebc0 UIKit`-[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 2097
frame #19: 0x00233667 UIKit`-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 824
frame #20: 0x00247f92 UIKit`-[UIApplication handleEvent:withNewEvent:] + 3517
frame #21: 0x00248555 UIKit`-[UIApplication sendEvent:] + 85
frame #22: 0x00235250 UIKit`_UIApplicationHandleEvent + 683
frame #23: 0x037eaf02 GraphicsServices`_PurpleEventCallback + 776
frame #24: 0x037eaa0d GraphicsServices`PurpleEventCallback + 46
frame #25: 0x01770ca5 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
frame #26: 0x017709db CoreFoundation`__CFRunLoopDoSource1 + 523
frame #27: 0x0179b68c CoreFoundation`__CFRunLoopRun + 2156
frame #28: 0x0179a9d3 CoreFoundation`CFRunLoopRunSpecific + 467
frame #29: 0x0179a7eb CoreFoundation`CFRunLoopRunInMode + 123
frame #30: 0x00232d9c UIKit`-[UIApplication _run] + 840
frame #31: 0x00234f9b UIKit`UIApplicationMain + 1225
* frame #32: 0x0000509d Matchismo`main(argc=1, argv=0xbfffedd8) + 141 at main.m:16
我不完全确定如何破译这个。从我一直遵循的指南中,他们说在包含“所有异常”断点之后,应该在我的源代码中概述引发的异常。如果有人可以帮助指导如何找出我崩溃的根源,我将不胜感激!
【问题讨论】:
-
并非所有异常都可以轻松追溯到代码中的错误。阅读堆栈跟踪的前几行,您的问题似乎与键值编码有关。
标签: objective-c xcode debugging breakpoints