Re: CLLocationManager-related crash in iOS 5
Re: CLLocationManager-related crash in iOS 5
- Subject: Re: CLLocationManager-related crash in iOS 5
- From: Rick Mann <email@hidden>
- Date: Fri, 14 Oct 2011 02:31:07 -0700
I figured out a little bit more. I make one request for location, then I call -stopUpdatingLocation and -autorelease the CLLocationManager from within the did-update callback.
But in iOS 5, even after that, it still calls me back once more, at which time I'm -autoreleasing it a second time.
Is this a bug?
--
Rick
On Oct 14, 2011, at 2:21 , Rick Mann wrote:
> My app seemed to run just fine prior to the GM release. Even ran on the seed fine (which appears to be the same build).
>
> My app tries to get the user location when it launches. It prompts, and if you say Allow, everything seems fine. But if you quit and re-launch, it crashes. The stack trace is useless, other than apparently an autorelease object down inside CLLocationManager is the culprit. If I comment out the creation of the CLLocationManager, everything is fine.
>
> Here's the stack:
>
> Thread 1, Queue : (null)
> #0 0x30211fbc in objc_msgSend ()
> #1 0x370204b6 in -[CLLocationManager dealloc] ()
> #2 0x302130c4 in _objc_rootRelease ()
> #3 0x30214db6 in objc_release ()
> #4 0x30213e0c in (anonymous namespace)::AutoreleasePoolPage::pop(void*) ()
> #5 0x30213d28 in _objc_autoreleasePoolPop ()
> #6 0x3502ae8e in _CFAutoreleasePoolPop ()
> #7 0x311afa02 in _wrapRunLoopWithAutoreleasePoolHandler ()
> #8 0x350aeb4a in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
> #9 0x350acd86 in __CFRunLoopDoObservers ()
> #10 0x350ad0e0 in __CFRunLoopRun ()
> #11 0x350304dc in CFRunLoopRunSpecific ()
> #12 0x350303a4 in CFRunLoopRunInMode ()
> #13 0x36fc3fec in GSEventRunModal ()
> #14 0x311cd742 in UIApplicationMain ()
> #15 0x000027cc in main at main.m:15
>
> main() looks like this:
>
> int
> main(int argc, char *argv[])
> {
> NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
> int retVal = UIApplicationMain(argc, argv, nil, nil); <--- line 15
> [pool release];
> return retVal;
> }
>
> Any ideas what's going on? Thanks much!
>
> --
> Rick
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden