2017-02-19 73 views
-1

每當我嘗試運行應用程序,我得到線程1:SIGABRT錯誤,雖然我的應用程序沒有任何網點或行爲(沒有視覺元素)類的AppDelegate主題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 

我感謝所有幫助,你可以提供

回答

1

試圖插入零反對

A nil對象正在插入Array中的應用程序的rootViewController中。這是SIGABRT崩潰的來源。

+0

非常感謝你 – Abdullah