Reputation: 435
i've my method that implement a reverseGeocoder
- (void)reversing {
geoCoder=[[MKReverseGeocoder alloc] initWithCoordinate:locManager.location.coordinate];
geoCoder.delegate=self;
[geoCoder start];
}
i recall reversing in another method with this:
[self performSelector:@selector(reversing) withObject:nil afterDelay:10];
and i receive
2010-04-30 17:44:17.616 high[1167:207] Retrive City Milano
2010-04-30 17:44:17.628 high[1167:207] geocoder released
2010-04-30 17:44:18.723 high[1167:207] Error Domain=MKErrorDomain Code=4 "Operation
could not be completed. (MKErrorDomain error 4.)"
Program received signal: “EXC_BAD_ACCESS”.
Can someone help me? :D
Upvotes: 0
Views: 1834
Reputation: 2579
My answer to a similar question:
I've met and solved this issue recently. In my case, when Apple Map cannot find any result for a query, it sometimes will just throw this this "MKErrorDomain = 4" error. So I ended up just treat this as "result not found".
It was painstaking to find this out, MapKit needs a better Error handling system.
Upvotes: 1
Reputation: 435
mhmmm now performSelector has work for mhmm 10-12 times, and after exit with this
Fri Apr 30 18:39:15 unknown high[1533] <Warning>: Retrive City Milano
Fri Apr 30 18:39:15 unknown high[1533] <Warning>: geocoder released
Fri Apr 30 18:39:21 unknown high[1533] <Error>: *** -[MKReverseGeocoder _mapkit_cache_heapTime]: unrecognized selector sent to instance 0x181ab0
Fri Apr 30 18:39:21 unknown high[1533] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[MKReverseGeocoder _mapkit_cache_heapTime]: unrecognized selector sent to instance 0x181ab0'
Fri Apr 30 18:39:21 unknown high[1533] <Error>: Stack: (
853417245,
845594132,
853421053,
852917017,
852879424,
852520544,
853224229,
852521740,
852695624,
852661532,
834346012,
834339464,
871973071,
871972849,
837931029,
837876319,
837876577,
837875951,
837875865,
837875737,
837875641,
853164967,
853163039,
834376564,
817839152,
817832496,
10921,
10816
)
Fri Apr 30 18:39:21 unknown UIKitApplication:com.zeronet.TestTest[0xc5d1][1533] <Notice>: terminate called after throwing an instance of 'NSException'
Fri Apr 30 18:39:23 unknown ReportCrash[1536] <Notice>: Formulating crash report for process high[1533]
Fri Apr 30 18:39:23 unknown com.apple.launchd[1] <Warning>: (UIKitApplication:com.zeronet.TestTest[0xc5d1]) Job appears to have crashed: Abort trap
Fri Apr 30 18:39:23 unknown SpringBoard[29] <Warning>: Application 'high' exited abnormally with signal 6: Abort trap
Fri Apr 30 18:39:24 unknown ReportCrash[1536] <Error>: Saved crashreport to /var/mobile/Library/Logs/CrashReporter/high_2010-04-30-183921_zeroPhone.plist using uid: 0 gid: 0, synthetic_euid: 501 egid: 0
Upvotes: 0
Reputation: 19789
It looks like you are releasing either the geocoder or its delegate, which causes the BAD_ACCESS. Odds are good that you have already released it in your error handler, or possibly via dealloc when your calling object is released.
Upvotes: 1