删除对象的来源:' removeObjectAtIndex:'

时间:2015-06-24 07:21:04

标签: ios objective-c iphone

我遇到了崩溃

-[__NSArrayM removeObjectAtIndex:] + 262

但是我的代码不使用removeObjectAtIndex:。是否还有其他可能在内部调用removeObjectAtIndex:的函数?

我的猜测是我replaceObjectAtIndex:

此外,是否有一些文档源我可以获得这样的信息?

这是完整的堆栈跟踪:

Thread : Fatal Exception: NSRangeException
0  CoreFoundation                 0x00000001860fe59c __exceptionPreprocess + 132
1  libobjc.A.dylib                0x000000019685c0e4 objc_exception_throw + 60
2  CoreFoundation                 0x0000000185fe362c -[__NSArrayM removeObjectAtIndex:]
3  Musixmatch                     0x0000000100b9da24 +[MyController updateMessage:] + 1011504
4  Musixmatch                     0x0000000100b95dc8 -[MyAPICalls sendNewMessage:] + 979668
5  libdispatch.dylib              0x0000000196ea13ac _dispatch_call_block_and_release + 24
6  libdispatch.dylib              0x0000000196ea136c _dispatch_client_callout + 16
7  libdispatch.dylib              0x0000000196eab4c0 _dispatch_queue_drain + 1216
8  libdispatch.dylib              0x0000000196ea4474 _dispatch_queue_invoke + 132
9  libdispatch.dylib              0x0000000196ead224 _dispatch_root_queue_drain + 664
10 libdispatch.dylib              0x0000000196eae75c _dispatch_worker_thread3 + 108
11 libsystem_pthread.dylib        0x000000019707d2e4 _pthread_wqthread + 816
12 libsystem_pthread.dylib        0x000000019707cfa8 start_wqthread + 4

所以从应用程序调用的最后一个方法是updateMessage:。更新邮件本身只有objectAtIndex:。然后它调用其他类中的两个方法。但如果它们导致崩溃,我相信它们应该被包含在堆栈跟踪中。

0 个答案:

没有答案