views:

610

answers:

2

I'm writing an MKMapKit app that allows the user to drag around an annotation. Everything seems to work for the most part, but it crashes every now and then with the following message:

2009-09-27 12:34:18.903 iParkNow![7181:207] *** -[LBSGAddressComponent _mapkit_cache_heapTime]: unrecognized selector sent to instance 0x195320
2009-09-27 12:34:18.907 iParkNow![7181:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[LBSGAddressComponent _mapkit_cache_heapTime]: unrecognized selector sent to instance 0x195320'

I've had no luck googling for useful information and the iphone forums have nothing useful either. I haven't attached any code since its a bit long. Just wondering if anyone how any idea what would cause this error. Thanks in advance!

+4  A: 

Do you try to reverse geocode more than one location at a time? This will cause the crash as of 3.1...So if the user is dragging and you start making calls to reverse geo code and keep them open as so many of them would be processing at one time then thats probably your problem.

Daniel
ok I check that, thanks for the response!
ennuikiller
by the way how do I stop the reverse geo-coding while the user is dragging?
ennuikiller
the -cancel method in reverse geocoding
Daniel
cool thanks for the help!
ennuikiller
A: 

I have the same phenomenon occurs in the following code...

  • (void)locationManager:(CLLocationManager*)manager didUpdateToLocation:(CLLocation*)newLocation fromLocation:(CLLocation*)oldLocation { ...

    _reverseGeocoder = [[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate]; _reverseGeocoder.delegate = self;
    [_reverseGeocoder start]; }

naomichi