应用程序在启动时崩溃

时间:2015-10-09 10:15:12

标签: ios objective-c iphone uikit

我的应用程序在启动时崩溃。它永远不会在应用程序上完成

  

2015-10-09 15:41:55.396MÖLLER[11840:574331]终止应用程序   未捕获的异常'NSInvalidArgumentException',原因:'    - [__ NSPlaceholderDictionary initWithObjects:forKeys:count:]:尝试从对象[0]中插入nil对象   ***第一次抛出调用堆栈:(0 CoreFoundation 0x026cc746 __exceptionPreprocess + 182 1 libobjc.A.dylib
  0x01f9ca97 objc_exception_throw + 44 2 CoreFoundation
  0x025c2c93 - [__ NSPlaceholderDictionary initWithObjects:forKeys:count:]   + 451 3 CoreFoundation 0x025d6b7b + [NSDictionary dictionaryWithObjects:forKeys:count:] + 754MOáLLER0x0004d65b - [TabBarViewController   viewDidLoad] + 3291 5 UIKit
  0x00a97db7 - [UITabBarController initWithNibName:bundle:] + 221 6
  MOÃàLLER0x0008984d - [AppDelegate   application:didFinishLaunchingWithOptions:] + 268 7 UIKit
  0x008e5f87 - [UIApplication   _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 287 8 UIKit 0x008e6d71 - [UIApplication   _callInitializationDelegatesForMainScene:transitionContext:] + 2938 9 UIKit 0x008ea3d2 - [UIApplication   _runWithMainScene:transitionContext:completion:] + 1639 10 UIKit 0x009038ee _84- [UIApplication   handleApplicationActivationWithScene:transitionContext:完成:] _ block_invoke   + 59 11 UIKit 0x008e8ffa - [UIApplication workspaceDidEndTransaction:] + 155 12 FrontBoardServices 0x03208c9e __37- [FBSWorkspace   clientEndTransaction:] _ block_invoke_2 + 71 13 FrontBoardServices
  0x0320872f _40- [FBSWorkspace performDelegateCallOut:] _ block_invoke +   54 14 FrontBoardServices 0x0321ad7c   __31- [FBSSerialQueue performAsync:] _ block_invoke_2 + 30 15 CoreFoundation 0x025ee050   CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 16 16 CoreFoundation
  0x025e3963 __CFRunLoopDoBlocks + 195 17 CoreFoundation
  0x025e37bb __CFRunLoopRun + 2715 18 CoreFoundation
  0x025e2a5b CFRunLoopRunSpecific + 443 19 CoreFoundation
  0x025e288b CFRunLoopRunInMode + 123 20 UIKit
  0x008e89b2 - [UIApplication _run] + 571 21 UIKit
  0x008ec0b6 UIApplicationMain + 152622MOáLLER
  0x0006a509 main + 94 23 libdyld.dylib
  0x03fe1ac9 start + 1)libc ++ abi.dylib:以uncaught终止   NSException类型的异常(lldb)

2 个答案:

答案 0 :(得分:1)

错误说

-[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

错误意味着您试图将nil放入字典中(不允许)。由于您使用字符串文字构建字典,因此不能nil

答案 1 :(得分:0)

最后问题得到了解决。正如我的家庭视图有我们从未在应用程序中使用的字体参考。