Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting a periodic crash when stopping MKMapKit location services
    primarykey
    data
    text
    <p>I get a very infrequent crash when stopping MKMapView location services in the applicationDidEnterBackground method. (I'm doing this to ensure that my app does not use location services when the app is in the background.)</p> <p>The code which gives rise to the crash looks like this:</p> <pre><code>- (void)MyAppDelegate applicationDidEnterBackground:(UIApplication *app) { [self.baseAppViewController stopUserTracking]; } </code></pre> <p>The stopUserTracking method does the following:</p> <pre><code>-(void)stopUserTracking { [baseAppViewController.mapView setUserTrackingMode:MKUserTrackingModeNone]; [baseAppViewController.mapView setShowsUserLocation:NO]; } </code></pre> <p>Note that the baseAppViewController is never released by the app; neither is the mapView. The baseAppViewController is the delegate of its mapView. The delegate is never set to nil.</p> <p>Here is the stack trace, which ends with a call to MKNormalizedPointForLayer. I've read elsewhere that the MKNormalizedPointForLayer may be due to an invalid annotation latlng (http://stackoverflow.com/questions/9766272/error-in-main-thread-mknormalizedpointforlayer). However I doubt that this is the case for my app: I've tried purposefully adding annotations with invalid lat/lngs, and don't get this error. The fact that this is happening as a result of the MKTilesRequireGoogleLegalNotices call is intriguing, but completely puzzling. Any thoughts?</p> <pre><code>Thread 0 Crashed: 0 MapKit 0x32b5de94 MKNormalizedPointForLayer + 28043 1 MapKit 0x32b5dd8f MKNormalizedPointForLayer + 27782 2 MapKit 0x32b5dca3 MKNormalizedPointForLayer + 27546 3 MapKit 0x32b6b901 MKTilesRequireGoogleLegalNotices + 44500 4 MapKit 0x32b69eed MKTilesRequireGoogleLegalNotices + 37824 5 MapKit 0x32b50673 MKTileSupportsTileSetStyle + 15378 6 MyApp 0x00040061 -[BaseAppViewController stopUserTracking] (BaseAppViewController.m:785) 7 MyApp 0x0001e3c9 -[MyAppDelegate applicationDidEnterBackground:] (MyAppDelegate.m:325) 8 UIKit 0x334fd235 -[UIApplication _handleApplicationSuspend:eventInfo:] + 760 9 UIKit 0x3348deff -[UIApplication handleEvent:withNewEvent:] + 2094 10 UIKit 0x3348d567 -[UIApplication sendEvent:] + 54 11 MyApp 0x000fcb41 -[UIApplication(HMCustom) customSendEvent:] + 85 12 UIKit 0x3348cf3b _UIApplicationHandleEvent + 5826 13 GraphicsServices 0x3764c22b PurpleEventCallback + 882 14 CoreFoundation 0x35a2d523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38 15 CoreFoundation 0x35a2d4c5 __CFRunLoopDoSource1 + 140 16 CoreFoundation 0x35a2c313 __CFRunLoopRun + 1370 17 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 18 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 19 GraphicsServices 0x3764b439 GSEventRunModal + 136 20 UIKit 0x334bbcd5 UIApplicationMain + 1080 21 MyApp 0x000026d3 main (main.m:27) Thread 1: 0 libsystem_kernel.dylib 0x362ff3a8 kevent + 24 1 libdispatch.dylib 0x348e9c29 _dispatch_mgr_wakeup + 0 Thread 2: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 WebCore 0x318aeca3 _ZL12RunWebThreadPv + 402 6 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 3: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 MyApp 0x00033823 LoggerWorkerThread (LoggerClient.m:494) 6 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 4: 0 libsystem_kernel.dylib 0x3630f570 __select + 20 1 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 5: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 Foundation 0x354e8bb9 +[NSURLConnection(Loader) _resourceLoadLoop:] + 308 6 Foundation 0x354e8a81 -[NSThread main] + 72 7 Foundation 0x3557c591 __NSThread__main__ + 1048 8 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 6: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 MapKit 0x32b4de1d MKTileSupportsTileSetStyle + 5052 6 Foundation 0x354e8a81 -[NSThread main] + 72 7 Foundation 0x3557c591 __NSThread__main__ + 1048 8 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 7: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 MyApp 0x0007e78b +[ASIHTTPRequest runRequests] + 171 6 Foundation 0x354e8a81 -[NSThread main] + 72 7 Foundation 0x3557c591 __NSThread__main__ + 1048 8 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 8: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 WebCore 0x318d80d9 _ZN7WebCoreL15runLoaderThreadEPv + 128 6 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 9: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 10: 0 libsystem_c.dylib 0x32e16cc8 start_wqthread + 0 Thread 11: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 12: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 13: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 14: 0 libsystem_kernel.dylib 0x362ff004 mach_msg_trap + 20 1 CoreFoundation 0x35a2d3f3 __CFRunLoopServiceMachPort + 126 2 CoreFoundation 0x35a2c12b __CFRunLoopRun + 882 3 CoreFoundation 0x359af4a5 CFRunLoopRunSpecific + 300 4 CoreFoundation 0x359af36d CFRunLoopRunInMode + 104 5 Foundation 0x354dcb75 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 256 6 MyApp 0x0011d50d +[FlurryHTTPEater sendMethod:to:body:headerFields:timeoutInterval:useWebView:] (FlurryHTTPEater.m:67) 7 MyApp 0x00126ae9 +[FlurrySession sendSessionsToServerWithTimeout:useWebView:requestAppCircleAds:requestVideoAds:requestAppSpotAds:requestReengageAds:sendCurrentSession:] (FlurrySession.m:1053) 8 MyApp 0x001265c7 +[FlurrySession sendSessionsToServerForAppCircle] (FlurrySession.m:1016) 9 Foundation 0x354e8a81 -[NSThread main] + 72 10 Foundation 0x3557c591 __NSThread__main__ + 1048 11 libsystem_c.dylib 0x32e1c735 _pthread_start + 320 Thread 15: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 16: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 17: 0 libsystem_kernel.dylib 0x3630fcd4 __workq_kernreturn + 8 Thread 0 crashed with ARM Thread State: r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0x41a00000 r4: 0x003b3520 r5: 0x003b3520 r6: 0xfffffffc r7: 0x2fea761c r8: 0x3f01fae8 r9: 0x00000000 r10: 0x0eaec170 r11: 0x3f485f10 ip: 0xbff00000 sp: 0x2fea7610 lr: 0x32b548ef pc: 0x32b5de94 cpsr: 0x20080030 Binary Images: (truncated) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload