Я получил журнал сбоев, описанный как эти:Разбился В NSArray инициализации
Exception Type: SIGABRT
Exception Codes: #0 at 0x3b694350
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[124]'
Last Exception Backtrace:
0 CoreFoundation 0x3346e2a3 __exceptionPreprocess (in CoreFoundation) + 163
1 libobjc.A.dylib 0x3b19697f objc_exception_throw (in libobjc.A.dylib) + 31
2 CoreFoundation 0x333b834d -[__NSPlaceholderArray initWithObjects:count:] (in CoreFoundation) + 165
3 CoreFoundation 0x333c6559 +[NSArray arrayWithObjects:count:] (in CoreFoundation) + 45
4 CoreFoundation 0x333d0869 -[NSDictionary allKeys] (in CoreFoundation) + 261
5 SogouInputIPhone.dylib 0x06707df1 0x66e2000 + 155121
6 SogouInputIPhone.dylib 0x066e5533 0x66e2000 + 13619
7 CoreFoundation 0x333bf037 _CFXNotificationPost (in CoreFoundation) + 1427
8 Foundation 0x33cd5599 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) + 73
9 UIKit 0x35301121 -[UIApplication _handleApplicationSuspend:eventInfo:] (in UIKit) + 817
10 UIKit 0x352771e7 -[UIApplication handleEvent:withNewEvent:] (in UIKit) + 2459
11 UIKit 0x352766cd -[UIApplication sendEvent:] (in UIKit) + 73
12 UIKit 0x3527611b _UIApplicationHandleEvent (in UIKit) + 6155
13 GraphicsServices 0x36f8e5a3 _PurpleEventCallback (in GraphicsServices) + 591
14 GraphicsServices 0x36f8e1d3 PurpleEventCallback (in GraphicsServices) + 35
15 CoreFoundation 0x33443173 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ (in CoreFoundation) + 35
16 CoreFoundation 0x33443117 __CFRunLoopDoSource1 (in CoreFoundation) + 139
17 CoreFoundation 0x33441f99 __CFRunLoopRun (in CoreFoundation) + 1385
18 CoreFoundation 0x333b4ebd CFRunLoopRunSpecific (in CoreFoundation) + 357
19 CoreFoundation 0x333b4d49 CFRunLoopRunInMode (in CoreFoundation) + 105
20 GraphicsServices 0x36f8d2eb GSEventRunModal (in GraphicsServices) + 75
21 UIKit 0x352ca301 UIApplicationMain (in UIKit) + 1121
22 MyApp 0x0000f94b main (in MyApp) (main.m:26)
23 libdyld.dylib 0x3b5cdb20 start (in libdyld.dylib) + 0
меня проверить свой код, не NSArray не used.It кажется, что цикл запуска был отправлен сенсорным событием, и генерировать NSArray , но я не уверен в этом, и что пускают в катастрофу.
Причина упоминается в журнале аварий. Msgstr "Попытка вставить нулевой объект в массив". Если вы не смогли найти этот пост связанный код. –
Я проверяю свой код, где используется NSArray, и не нахожу вставить 'nil' в массив – yuyeqingshan
, вероятно, это подкласс nsarray, проверьте код для мест, где вы вставляете объекты в другие материалы, а также отправляйте код, который выполняется непосредственно перед это сбой – Pochi