MKReverseGeocoder calls EXC_BAD_ACCESS?

I have an application that is showing intermittent failure. In the crash logs, a stack trace is displayed, for which it is difficult for me to decrypt, so we hope that someone else sees this and can point me in the right direction.

Basically, the application performs a reverse geocoding request at startup to show the user's location in the label. In addition, I am making another geocoding callback for a specific API call.

What happens, sometimes this MKReverseGeocoder takes a very long time to return. In the end, I assume that I will get a reject callback, and sometimes I do, but it may be a few minutes before.

Since the API call also issues another MKReverseGeocoder request, I think maybe there is a problem with multiple simultaneous calls?

Here is my stack:

Program received signal: "EXC_BAD_ACCESS". (gdb) backtrace #0 0x30c237a0 in -[MKPlacemark _mapkit_cache_heapTime] () #1 0x30bffe60 in compareTimes () #2 0x32403b24 in CFBinaryHeapAddValue () #3 0x30c0030c in -[MKCache setObject:forKey:] () #4 0x30c2aa48 in -[MKReverseGeocodeCache addPlacemark:forCoordinate:] () #5 0x30c2251c in -[MKReverseGeocoder requester:didReceiveResponse:forRequest:] () #6 0x3388cc1c in -[PBRequester _tryParseData] () #7 0x3388b288 in -[PBRequester connection:didReceiveData:] () #8 0x337490ce in -[NSURLConnection(NSURLConnectionReallyInternal) sendDidReceiveData:originalLength:] () #9 0x33748ff0 in _NSURLConnectionDidReceiveData () #10 0x30899ff8 in URLConnectionClient::_clientDidReceiveData () #11 0x3088ca3e in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload () #12 0x3088cb40 in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload () #13 0x3088cb40 in URLConnectionClient::ClientConnectionEventQueue::processAllEventsAndConsumePayload () #14 0x3088c8ce in URLConnectionClient::processEvents () #15 0x3088c878 in URLConnection::multiplexerClientPerform () #16 0x3088c7f8 in MultiplexerSource::perform () #17 0x3088c798 in MultiplexerSource::_perform () #18 0x323f4f48 in CFRunLoopRunSpecific () #19 0x323f4c1e in CFRunLoopRunInMode () #20 0x335051c8 in GSEventRunModal () #21 0x324a6c30 in -[UIApplication _run] () #22 0x324a5230 in UIApplicationMain () #23 0x000024f8 in main (argc=1, argv=0x2ffff504) at /Users/ben/projects/ABC/iphone/ABC/main.m:14 

Since it doesn't look like it even calls my callback method, I don’t know where to look for this EXC_BAD_ACCESS problem. My delegate is certainly still active (I look at the view controller that launched the request).

1 last note: it only appeared on iOS 3.1.3 so far. I have not seen this happen for iOS 4.0 yet .u

+6
iphone ios4 exc-bad-access mkreversegeocoder
source share
2 answers

Try using the Zombies tool from the xcode profile. This will help you discover which object memory is calling EXC_BAD_ACCESS.

0
source share

Here is a Google Reverse Geocoding API document that returns JSON as well as XML output, as well as a reliable and stable api.

http://code.google.com/apis/maps/documentation/geocoding/

for example, this url provides JSON output, so using this, you can solve your problem. Let me know if this will work for you or not?

http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true_or_false

0
source share

All Articles