如何解决Xcode中的lldb错误?

时间:2014-07-25 12:25:05

标签: xcode debugging ios7 crash lldb

我的应用程序在模拟器上工作正常,并在设备上工作,但曾几何时它开始崩溃。 我只是因为没有消息而得到“lldb”错误。当我输入“bt”命令时,我看到了:

  

      
  • 线程#1:tid = 0x24a8,0x38a1fcc0 libobjc.A.dylib objc_exception_throw, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x38a1fcc0 libobjc.A.dylib objc_exception_throw   帧#1:0x2e284bd0 CoreFoundation -[NSException raise] + 8 frame #2: 0x2ebca15e Foundation - [NSObject(NSKeyValueCoding)setValue:forKey:] + 202   帧#3:0x2ebdbd8c基础-[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 300 frame #4: 0x2e1f4a54 CoreFoundation - [NSArray makeObjectsPerformSelector:] + 180   帧#5:0x30e2553e UIKit -[UINib instantiateWithOwner:options:] + 1122 frame #6: 0x30d7de8e UIKit - [UIViewController _loadViewFromNibNamed:bundle:] + 234   帧#7:0x30bda344 UIKit -[UIViewController loadView] + 92 frame #8: 0x30aba874 UIKit - [UIViewController loadViewIfRequired] + 72   帧#9:0x30aba7f0 UIKit -[UIViewController view] + 24 frame #10: 0x30bda276 UIKit - [UIWindow handleStatusBarChangeFromHeight:toHeight:] + 694   帧#11:0x30b41416 UIKit +[UIWindow _noteStatusBarHeightChanged:oldHeight:forAutolayoutRootViewsOnly:] + 238 frame #12: 0x30c41b10 UIKit__79 - [UIApplication _setStatusBarHidden:animationParameters:changeApplicationFlag:]_block_invoke + 132 frame #13: 0x30aeba1a UIKit + [UIView(UIViewAnimationWithBlocks)_setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 490   帧#14:0x30c2431e UIKit +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:completion:] + 70 frame #15: 0x30b66dca UIKit - [UIApplication _setStatusBarHidden:animationParameters:changeApplicationFlag:] + 462   帧#16:0x30ac18e0 UIKit -[UIApplication _updateCurrentStatusBarViewControllerAppearance] + 248 frame #17: 0x30abed72 UIKit - [UIWindow _setHidden:forced:] + 234   帧#18:0x30b28a30 UIKit -[UIWindow makeKeyAndVisible] + 60 frame #19: 0x30b256c4 UIKit - [UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1820   帧#20:0x30b1fca8 UIKit -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 720 frame #21: 0x30abbc76 UIKit - [UIApplication handleEvent:withNewEvent:] + 3550   帧#22:0x30abadd8 UIKit -[UIApplication sendEvent:] + 72 frame #23: 0x30b1f3e4 UIKit _ UIApplicationHandleEvent + 616   帧#24:0x33128b54 GraphicsServices _PurpleEventCallback + 608 frame #25: 0x3312873e GraphicsServices PurpleEventCallback + 34   帧#26:0x2e24f806 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 34 frame #27: 0x2e24f7a2 CoreFoundation __ CFRunLoopDoSource1 + 346   帧#28:0x2e24df6e CoreFoundation __CFRunLoopRun + 1406 frame #29: 0x2e1b8728 CoreFoundation CFRunLoopRunSpecific + 524   帧#30:0x2e1b850a CoreFoundation CFRunLoopRunInMode + 106 frame #31: 0x30b1e60a UIKit - [UIApplication _run] + 762   帧#32:0x30b19870 UIKit UIApplicationMain + 1136 <ul> <li>frame #33: 0x000e5ed8 SpriteKitSimpleGame main(argc = 1,argv = 0x27d62c34)+ 116 at main.m:16
  •   
  

我无法理解它崩溃的原因。可能是什么原因?

UPD

我已禁用异常断点并遇到新的奇怪错误:

  

由于未捕获的异常'NSUnknownKeyException'而终止应用程序,原因:'[setValue:forUndefinedKey:]:此类与密钥snewRecordLabel不符合密钥值编码。'

从Storyboard UILabel中删除了 snewRecordLabel ,但这可能是出错的原因。如何删除它?

1 个答案:

答案 0 :(得分:0)

snewRecordLabel的故事板中有一些连接,你可以将故事板打开成简单的textedit&amp;如果找到snewRecordLabel,请查看xml数据,而故事板中必须存在必须缺少的链接。