iOS崩溃核心位置CFBasicHashCreateCopy?

时间:2014-06-17 18:58:49

标签: ios crash core-location core-foundation

我已经通过Crashlytics报告了这个问题,虽然我已经无法在本地复制它了,所以除了下面的堆栈跟踪之外我没有任何其他事情可做。不确定如果堆栈跟踪中对CoreLocation的引用与它有关,但我不确定可能是什么原因。我的项目正在使用ARC。任何线索?

Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x14eb3510.events
0  CoreFoundation                 0x307769a8 CFBasicHashCreateCopy + 712
1  libobjc.A.dylib                0x3afd1a19 object_setClass + 24
2  CoreFoundation                 0x30782d0f CFDictionaryCreateMutableCopy + 154
3  CoreLocation                   0x30d0a8f3 CLLocationCoordinate2DGetDistanceFrom + 47590
4  CoreLocation                   0x30d2d607 CLClientCreateIso6709Notation + 49626
5  CoreFoundation                 0x30786d45 __CFDictionaryApplyFunction_block_invoke + 16
6  CoreFoundation                 0x30772cd4 CFBasicHashApply + 128
7  CoreFoundation                 0x3077be27 CFDictionaryApplyFunction + 154
8  CoreLocation                   0x30d2cc25 CLClientCreateIso6709Notation + 47096
9  CoreLocation                   0x30d2b625 CLClientCreateIso6709Notation + 41464
10 libxpc.dylib                   0x3b5fc3a9 _xpc_connection_call_event_handler + 40
11 libxpc.dylib                   0x3b5fee67 do_mach_notify_port_destroyed + 122
12 libxpc.dylib                   0x3b5fedd1 _Xmach_notify_port_destroyed + 104
13 libxpc.dylib                   0x3b5fed47 notify_server + 62
14 libxpc.dylib                   0x3b5fa9cf _xpc_connection_mach_event + 1926
15 libdispatch.dylib              0x3b4bdf43 _dispatch_mach_msg_invoke + 118
16 libdispatch.dylib              0x3b4c0c71 _dispatch_queue_drain + 412
17 libdispatch.dylib              0x3b4bda6b _dispatch_mach_invoke + 78
18 libdispatch.dylib              0x3b4c0c71 _dispatch_queue_drain + 412
19 libdispatch.dylib              0x3b4bdc6f _dispatch_queue_invoke + 42
20 libdispatch.dylib              0x3b4c0c71 _dispatch_queue_drain + 412
21 libdispatch.dylib              0x3b4bdc6f _dispatch_queue_invoke + 42
22 libdispatch.dylib              0x3b4c15f1 _dispatch_root_queue_drain + 76
23 libdispatch.dylib              0x3b4c18dd _dispatch_worker_thread2 + 56
24 libsystem_pthread.dylib        0x3b5ecc17 _pthread_wqthread + 298

这是另一个可能相关的。

Crashed: com.apple.CoreLocation.ConnectionClient.0x17665330.events
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x11755e44

Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x17665330.events
0  libobjc.A.dylib                0x381db626 objc_msgSend + 5
1  CoreFoundation                 0x2d979d75 CFDictionaryCreateMutableCopy + 320
2  CoreLocation                   0x2df018f3 (null) + 47590
3  CoreLocation                   0x2df24607 (null) + 49626
4  CoreFoundation                 0x2d97dd05 __CFDictionaryApplyFunction_block_invoke + 16
5  CoreFoundation                 0x2d969c94 CFBasicHashApply + 128
6  CoreFoundation                 0x2d972de7 CFDictionaryApplyFunction + 154
7  CoreLocation                   0x2df23c25 (null) + 47096
8  CoreLocation                   0x2df22625 (null) + 41464
9  libxpc.dylib                   0x387fb3a9 _xpc_connection_call_event_handler + 40
10 libxpc.dylib                   0x387fde67 do_mach_notify_port_destroyed + 122
11 libxpc.dylib                   0x387fddd1 _Xmach_notify_port_destroyed + 104
12 libxpc.dylib                   0x387fdd47 notify_server + 62
13 libxpc.dylib                   0x387f99cf _xpc_connection_mach_event + 1926
14 libdispatch.dylib              0x386bcf43 _dispatch_mach_msg_invoke + 118
15 libdispatch.dylib              0x386bfc71 _dispatch_queue_drain + 412
16 libdispatch.dylib              0x386bca6b _dispatch_mach_invoke + 78
17 libdispatch.dylib              0x386bfc71 _dispatch_queue_drain + 412
18 libdispatch.dylib              0x386bcc6f _dispatch_queue_invoke + 42
19 libdispatch.dylib              0x386bfc71 _dispatch_queue_drain + 412
20 libdispatch.dylib              0x386bcc6f _dispatch_queue_invoke + 42
21 libdispatch.dylib              0x386c05f1 _dispatch_root_queue_drain + 76
22 libdispatch.dylib              0x386c08dd _dispatch_worker_thread2 + 56
23 libsystem_pthread.dylib        0x387ebc17 _pthread_wqthread + 298

1 个答案:

答案 0 :(得分:2)

您已让系统将消息发送到对象原本应该存在的错误内存位置。所以我的建议是启用僵尸检测(编辑方案,然后选择诊断选项卡,勾选启用僵尸对象)并重新执行测试场景,特别是导致CoreLocation事件的任何事情。

然后,当核心位置向已发布的对象发送消息时,您将知道该对象最初被释放的内容(因为它被这个调试设置人为地保存为僵尸对象)。