Keep getting EXC_BAD_ACCESS. Ran NSZombieEnabled and came up with nothing.
In simulator console:
2010-09-11 23:39:56.876 [19072:207] 1.309789, lat, 103.772196, lon
In device console:
EXC_BAD_ACCESS
The line of code:
NSLog(@"%f, lat, %f, lon",latitudeString,longitudeString);
What CLManager is doing:
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{
NSLog(@"Entering mlocationmanager did updatetolocation");
latitudeString = [NSString stringWithFormat:@"%f", newLocation.coordinate.latitude];
longitudeString = [NSString stringWithFormat:@"%f", newLocation.coordinate.longitude];
NSLog(@"lat %@ long %@", latitudeString, longitudeString);
NSLog(@"%@",newLocation.description);
if (latitudeString.length >0 && longitudeString.length > 0){
NSLog(@"Yes both are more than 0");
locationIsReady = YES;
}
[self.tableView reloadData];
}
What is happening here? Both variables are in my header file and CLLocationManagerDelegate is conformed to. Been working on this for a few hours, but no luck. Hope you guys can help.
NSString *latitudeString;
NSString *longitudeString;