class AppDelegate Thread 1: SIGABRT



每当我尝试运行应用程序时,我会得到线程1:sigabrt错误,尽管我的应用程序没有任何插座或操作(没有视觉元素)

这是控制台信息:

    2017-02-19 12:43:31.787 ParseStarterProject-Swift[1623:158691] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010f75fd4b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x000000010f1c121e objc_exception_throw + 48
    2   CoreFoundation                      0x000000010f66f783 -[__NSPlaceholderArray initWithObjects:count:] + 275
    3   CoreFoundation                      0x000000010f676994 +[NSArray arrayWithObjects:count:] + 52
    4   ParseStarterProject-Swift           0x000000010e3517d0 -[PFTaskQueue enqueue:] + 243
    5   ParseStarterProject-Swift           0x000000010e2f7e57 -[PFObject saveInBackground] + 121
    6   ParseStarterProject-Swift           0x000000010e2f7ef3 -[PFObject saveInBackgroundWithBlock:] + 49
    7   ParseStarterProject-Swift           0x000000010e2c13f0 _TFC25ParseStarterProject_Swift14ViewController11viewDidLoadfT_T_ + 832
    8   ParseStarterProject-Swift           0x000000010e2c1a92 _TToFC25ParseStarterProject_Swift14ViewController11viewDidLoadfT_T_ + 34
    9   UIKit                               0x000000010ff08a3d -[UIViewController loadViewIfRequired] + 1258
    10  UIKit                               0x000000010ff08e70 -[UIViewController view] + 27
    11  UIKit                               0x000000010fdd24b5 -[UIWindow addRootViewControllerViewIfPossible] + 71
    12  UIKit                               0x000000010fdd2c06 -[UIWindow _setHidden:forced:] + 293
    13  UIKit                               0x000000010fde6519 -[UIWindow makeKeyAndVisible] + 42
    14  UIKit                               0x000000010fd5ef8d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818
    15  UIKit                               0x000000010fd650ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
    16  UIKit                               0x000000010fd6226d -[UIApplication workspaceDidEndTransaction:] + 188
    17  FrontBoardServices                  0x0000000112bac6cb __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    18  FrontBoardServices                  0x0000000112bac544 -[FBSSerialQueue _performNext] + 189
    19  FrontBoardServices                  0x0000000112bac8cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    20  CoreFoundation                      0x000000010f704761 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    21  CoreFoundation                      0x000000010f6e998c __CFRunLoopDoSources0 + 556
    22  CoreFoundation                      0x000000010f6e8e76 __CFRunLoopRun + 918
    23  CoreFoundation                      0x000000010f6e8884 CFRunLoopRunSpecific + 420
    24  UIKit                               0x000000010fd60aea -[UIApplication _run] + 434
    25  UIKit                               0x000000010fd66c68 UIApplicationMain + 159
    26  ParseStarterProject-Swift           0x000000010e2c37ff main + 111
    27  libdyld.dylib                       0x0000000111fe668d start + 1
    28  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

我感谢您提供的任何帮助

尝试插入零对象

在应用程序的rootViewController中,将nil对象插入Array。那是SIGABRT崩溃的来源。

最新更新