title: iOS crash in CoreLocation
body: <p>I'm seeing this crash my iOS app after it's been running for 10 minutes:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The offending thread:</p>
  
  <pre><code>Thread 6 name:  Dispatch queue: com.apple.locationd.registration.xpcq
  Thread 6 Crashed:
  0   libstdc++.6.dylib               0x33ed32f8 std::string::compare(std::string const&amp;) const + 8
  1   CoreLocation                    0x3095ad54 std::_Rb_tree&lt;std::string, std::pair&lt;std::string const, void ( block_pointer)(CLConnectionMessage*)&gt;, std::_Select1st&lt;std::pair&lt;std::string const, void ( block_pointer)(CLConnectionMessage*)&gt; &gt;, std::less&lt;std::string&gt;, std::allocator&lt;std::pair&lt;std::string const, void ( block_pointer)(CLConnectionMessage*)&gt; &gt; &gt;::find(std::string const&amp;) + 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
  </code></pre>
  
  <p>The console doesn't give me any messages except to say that I have a crash. Any thoughts?</p>