appdata.items is NSMutableArray object.
source code
-(void)deleteAppDataItemId:(NSInteger)identifier{
NSLog(@"%@", [appdata.items objectAtIndex:identifier]);
NSLog(@"%i", identifier);
[appdata.items removeObjectAtIndex:identifier];
}
l开发者_Python百科og
2009-11-08 21:53:01.683 xxx[14283:207] (
200,
"",
2009-11-08 21:52:53 +0900
)
2009-11-08 21:53:01.684 xxx[14283:207] 0
2009-11-08 21:53:01.685 xxx[14283:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'
What caused this error?
Set the debugger to break on objc_exception_throw
, then run your program in the debugger. When you hit the exception, look at the stack trace. Some of the frames in the stack will be in Cocoa or CF code; others will be in your code. Switch to the topmost frame that's in your code, and start examining variables. You should find the problem in short order that way.
I believe the crash happens in another array. Have you tried using a debugger?
精彩评论