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

应用程序收到SIGABRT并在ipad中死亡,但同样的东西在模拟器上运行良好,ipad,crash,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

我的应用程序在模拟器中运行良好,但每当我在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]]];

在插槽中2ViewController viewDidLoad

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

结帐


blur0-blur10 png被复制并存在于ur目标中

如果没有代码,将很难锁定点,但您似乎正在将一个nil对象添加到可变数组中。你能在你正在做的地方添加代码吗?我已经在主要问题中添加了它Blur0-blur10 png被复制并存在于你的目标中现在我明白了为什么它不能在模拟器上工作只是在运行旧的副本,但在我的项目中,我在移动Smomething时意外地删除了它们,以便将它们全部复制到你的项目中