CLLocation is not nil but trying to print it out throws EXC_BAD_ACCESS
Posted
by nefsu
on Stack Overflow
See other posts from Stack Overflow
or by nefsu
Published on 2010-05-06T06:17:03Z
Indexed on
2010/05/06
7:08 UTC
Read the original article
Hit count: 391
Sorry, this may be a noob question but I'm working with CoreLocation and this has be stumped.
I'm looking up the currentLocation using a singleton that was recommended on this site and when I get the currentLocation object, it returns true to a not nil check. However, when I try to print out its description, it throws EXC_BAD_ACCESS.
//WORKS Current location 8.6602e-290
NSLog(@"Current location %g",currLoc);
//DOESN'T WORK
NSLog(@"Current location %@",[currLoc description]);
//DOESN'T WORK - Is this causing the description to fail as well?
NSLog(@"Current location %g",currLoc.coordinate.latitude);
Why am I able to see something on the first one but not the others? BTW, this is being run on a 3.1.2 simulator Thanks.
© Stack Overflow or respective owner