我在哪里可以找到Sigabrt错误的来源?

时间:2017-05-03 16:21:19

标签: ios swift sigabrt

我对Xcode和Swift很新,在我之前的许多项目中,我一直收到一个Thread 1:signal SIGABRT错误。我无法从错误报告中辨别出问题所在。有人可以帮助找到错误的来源本身。这是错误报告:

2017-05-03 11:10:02.608 coin op[18988:750658] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<coin_op.ViewController 0x7f9b33522250> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key test.'

*** First throw call stack:
(
    0   CoreFoundation                      0x000000010bfedd85 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010dd91deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010bfed9c9 -[NSException raise] + 9
    3   Foundation                          0x000000010c3bf19b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
    4   UIKit                               0x000000010c9a8d0c -[UIViewController setValue:forKey:] + 88
    5   UIKit                               0x000000010cbdf7fb -[UIRuntimeOutletConnection connect] + 109
    6   CoreFoundation                      0x000000010bf27890 -[NSArray makeObjectsPerformSelector:] + 224
    7   UIKit                               0x000000010cbde1de -[UINib instantiateWithOwner:options:] + 1864
    8   UIKit                               0x000000010c9af8d6 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
    9   UIKit                               0x000000010c9b0202 -[UIViewController loadView] + 178
    10  UIKit                               0x000000010c9b0560 -[UIViewController loadViewIfRequired] + 138
    11  UIKit                               0x000000010c9b0cd3 -[UIViewController view] + 27
    12  UIKit                               0x000000010c886fb4 -[UIWindow addRootViewControllerViewIfPossible] + 61
    13  UIKit                               0x000000010c88769d -[UIWindow _setHidden:forced:] + 282
    14  UIKit                               0x000000010c899180 -[UIWindow makeKeyAndVisible] + 42
    15  UIKit                               0x000000010c80ded9 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
    16  UIKit                               0x000000010c814568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
    17  UIKit                               0x000000010c811714 -[UIApplication workspaceDidEndTransaction:] + 188
    18  FrontBoardServices                  0x000000010fc228c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    19  FrontBoardServices                  0x000000010fc22741 -[FBSSerialQueue _performNext] + 178
    20  FrontBoardServices                  0x000000010fc22aca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    21  CoreFoundation                      0x000000010bf13301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x000000010bf0922c __CFRunLoopDoSources0 + 556
    23  CoreFoundation                      0x000000010bf086e3 __CFRunLoopRun + 867
    24  CoreFoundation                      0x000000010bf080f8 CFRunLoopRunSpecific + 488
    25  UIKit                               0x000000010c810f21 -[UIApplication _run] + 402
    26  UIKit                               0x000000010c815f09 UIApplicationMain + 171
    27  coin op                             0x000000010bdffe12 main + 114
    28  libdyld.dylib                       0x000000010e85592d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

1 个答案:

答案 0 :(得分:1)

关键信息是:

  

[UIViewController setValue:forKey:]此类与密钥测试不符合键值编码。

     

[UIRuntimeOutletConnection connect]

这导致Interface Builder

中的连接断开
  • ⇧⌘F
  • 输入test返回
  • 浏览搜索结果并选择指向Interface Builder的那个。
  • 断开死角。