应用程序收到SIGABRT并死于ipad,但同样的东西在模拟器上运行很好

时间:2011-07-05 11:08:25

标签: ipad crash

我的应用程序在我的模拟器中运行良好,但每当我在ipad中安装它 它收到SIGABRT并死掉

2011-07-05 16:23:59.575 slots2[11008:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSMutableArray insertObject:atIndex:]: attempt to insert nil object at 0'
*** Call stack at first throw:
(
0   CoreFoundation                      0x3398964f __exceptionPreprocess + 114
1   libobjc.A.dylib                     0x321d5c5d objc_exception_throw + 24
2   CoreFoundation                      0x338f1efd -[__NSArrayM insertObject:atIndex:] + 472
3   CoreFoundation                      0x338f1d1b -[__NSArrayM addObject:] + 34
4   slots2                              0x00005215 -[slots2ViewController viewDidLoad] + 420
5   UIKit                               0x3485ef0f -[UIViewController view] + 110
6   slots2                              0x00002d31 -[slots2AppDelegate application:didFinishLaunchingWithOptions:] + 92
7   UIKit                               0x3485d821 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 772
8   UIKit                               0x34857b65 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 272
9   UIKit                               0x3482c7d7 -[UIApplication handleEvent:withNewEvent:] + 1114
10  UIKit                               0x3482c215 -[UIApplication sendEvent:] + 44
11  UIKit                               0x3482bc53 _UIApplicationHandleEvent + 5090
12  GraphicsServices                    0x33bcde77 PurpleEventCallback + 666
13  CoreFoundation                      0x33960a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
14  CoreFoundation                      0x3396283f __CFRunLoopDoSource1 + 166
15  CoreFoundation                      0x3396360d __CFRunLoopRun + 520
16  CoreFoundation                      0x338f3ec3 CFRunLoopRunSpecific + 230
17  CoreFoundation                      0x338f3dcb CFRunLoopRunInMode + 58
18  UIKit                               0x34856d49 -[UIApplication _run] + 372
19  UIKit                               0x34854807 UIApplicationMain + 670
20  slots2                              0x00002c91 main + 88
21  slots2                              0x00002c34 start + 40
)

terminate called after throwing an instance of 'NSException'
Program received signal:  “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.1 (8G4)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
(gdb) 

但我确定所有文件都存在,因为在模拟器中运行相同的东西

以下数组是可能是问题的数组

  NSString *SubDir = [NSString stringWithFormat:@"/R/%d",Theme];
for(int i = 0;i<11;i++)
 [SpinAnimationArray addObject:[UIImage  imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"blur%d",i] ofType:@"png" inDirectory:SubDir]]];

1 个答案:

答案 0 :(得分:0)

在slots2ViewController viewDidLoad

中 你有一个数组,你试图添加索引错误的对象。

和结帐

blur0 - blur10 png被复制并存在于你的目标

相关问题