CoreLocation中的iOS崩溃

时间:2012-02-22 23:40:40

标签: ios crash core-location

我看到这个崩溃后我的iOS应用程序运行了10分钟后:

Date/Time:       2012-02-22 15:26:41.415 -0800
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x49980286
Crashed Thread:  6

违规话题:

Thread 6 name:  Dispatch queue: com.apple.locationd.registration.xpcq
Thread 6 Crashed:
0   libstdc++.6.dylib               0x33ed32f8 std::string::compare(std::string const&) const + 8
1   CoreLocation                    0x3095ad54 std::_Rb_tree<std::string, std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)>, std::_Select1st<std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)> >, std::less<std::string>, std::allocator<std::pair<std::string const, void ( block_pointer)(CLConnectionMessage*)> > >::find(std::string const&) + 32
2   CoreLocation                    0x30959964 CLConnection::handleMessage(CLConnectionMessage*) + 16
3   CoreLocation                    0x3095a78c __setEventHandler_block_invoke_0 + 360
4   libxpc.dylib                    0x37a428c2 __XPC_CONNECTION_EVENT_HANDLER_CALLOUT__ +    30
5   libxpc.dylib                    0x37a3bd5c _xpc_connection_recv_message + 500
6   libxpc.dylib                    0x37a3bb18 _xpc_connection_wakeup_recv + 160
7   libxpc.dylib                    0x37a3b9b8 _xpc_connection_wakeup2 + 1264
8   libxpc.dylib                    0x37a3b3f6 _xpc_connection_wakeup + 62
9   libdispatch.dylib               0x36d7821e _dispatch_source_invoke + 510
10  libdispatch.dylib               0x36d75b70 _dispatch_queue_invoke$VARIANT$up + 40
11  libdispatch.dylib               0x36d75caa _dispatch_queue_drain + 202
12  libdispatch.dylib               0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
13  libdispatch.dylib               0x36d75caa _dispatch_queue_drain + 202
14  libdispatch.dylib               0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
15  libdispatch.dylib               0x36d75caa _dispatch_queue_drain + 202
16  libdispatch.dylib               0x36d75b66 _dispatch_queue_invoke$VARIANT$up + 30
17  libdispatch.dylib               0x36d7676c _dispatch_worker_thread2 + 208
18  libsystem_c.dylib               0x32ee21c8 _pthread_wqthread + 288
19  libsystem_c.dylib               0x32ee209c start_wqthread + 0

除了说我崩溃之外,控制台没有给我任何消息。有什么想法吗?

2 个答案:

答案 0 :(得分:4)

因此经过大量的挖掘后,我能够重新解决问题并找到导致问题的原因。如果你在紧密循环中调用 - [CLLocationManager startUpdatingLocation]和 - [CLLocationManager stopUpdatingLocation],这似乎就会发生。

答案 1 :(得分:0)

我也遇到了这个问题,但仅限iOS 5.x(在模拟器中测试,没有设备。)当我有多个位置管理器实例,并且两者都有代表时,似乎会发生这种情况组。