【发布时间】:2011-10-22 12:01:49
【问题描述】:
我通过我的 iOS 应用程序的用户收到崩溃报告,但崩溃我无法重现自己,也无法将错误追溯到我自己的代码中的一行(除了它源自 main.m 中的第 14 行但这是 iOS 应用程序的默认应用程序创建。在我收到的崩溃报告下方。
了解在某些时候,正在从空数组中检索索引为 0 的对象。但是由于它似乎没有指向我自己的代码,它会是iOS中的一个错误吗? (它发生在不同的平台和不同的 iOS 版本上)。
我希望有人知道发生了什么,或者可以为我指明正确的方向。 谢谢。
崩溃报告:
Incident Identifier: [TODO]
CrashReporter Key: [TODO]
Process: Mary Black [797]
Path: /var/mobile/Applications/28A68F8B-294E-4B86-9E75-ED5484E5EF4D/Mary Black.app/Mary Black
Identifier: net.broset.Mary-Black
Version: 225
Code Type: ARM (Native)
Parent Process: launchd [1]
Date/Time: 2011-10-14 03:47:32 +0000
OS Version: iPhone OS 5.0 (9A334)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: #0 at 0x35b07848
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception \\\'NSRangeException\\\', reason: \\\'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array\\\'
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00010848 __kill + 8
1 CoreFoundation 0x000b9987 __handleUncaughtException + 75
2 libobjc.A.dylib 0x000092d1 _objc_terminate + 129
3 libc++abi.dylib 0x000043c5 _ZL19safe_handler_callerPFvvE + 77
4 libc++abi.dylib 0x00004451 operator delete(void*) + 1
5 libc++abi.dylib 0x00005825 __cxa_current_exception_type + 1
6 libobjc.A.dylib 0x00009235 objc_exception_rethrow + 13
7 CoreFoundation 0x0000f545 CFRunLoopRunSpecific + 405
8 CoreFoundation 0x0000f3a5 CFRunLoopRunInMode + 105
9 GraphicsServices 0x00003fed GSEventRunModal + 157
10 UIKit 0x00031743 UIApplicationMain + 1091
11 Mary Black 0x00002fa7 main (main.m:14)
【问题讨论】:
-
发布整个崩溃日志(与其他线程)查看此崩溃日志并不能说明它崩溃的位置。不太可能是它在操作系统中的错误。
-
你在用 UICollectionView 吗??
-
我在尝试更改 collectionView 的 .collectionViewLayout 属性时得到了类似的跟踪。你提到了 UICollectionView;这是否意味着你有一个想法?
标签: objective-c ios crash nsarray