2012-11-07 64 views
2

我一直在爲此工作了幾天。任何想法這意味着什麼?請幫忙! 讓我知道,如果有更多的信息需要在後臺崩潰中運行核心位置的ipad應用程序

EXC_BAD_ACCESS(SIGSEGV)

螺紋11名:調度隊列:com.apple.CoreLocation.ConnectionClient.0x200826b0.events 線11毀損: 0 libdispatch。 dylib 0x387b2420 dispatch_sync_f $ $ VARIANT熔點+ 0 1 CoreLocation 0x393c8088 CLConnectionClient :: setCachedResponse(CLConnectionMessage *,布爾(block_pointer)())+ 76 2 CoreLocation 0x393c8558 __setDefaultMessageHandler_onQueue_block_invoke_0 + 28 3 CoreLocation 0x393c7070 __setEventHandler_block_invo ke_0 + 344 4 libxpc.dylib 0x367ef7e4 _xpc_connection_mach_event + 768 5 libdispatch.dylib 0x387b6524 _dispatch_mach_msg_invoke $ $ VARIANT熔點+ 120 6 libdispatch.dylib 0x387b2e8e _dispatch_queue_drain $ $ VARIANT熔點+ 78 7 libdispatch.dylib 0x387b67b2 _dispatch_mach_invoke $ $ VARIANT熔點+ 158 8 libdispatch.dylib 0x387b2e8e _dispatch_queue_drain $ $ VARIANT熔點+ 78 9 libdispatch.dylib 0x387b2dbc _dispatch_queue_invoke $ $ VARIANT熔點+ 36 10 libdispatch.dylib 0x387b2e8e _dispatch_queue_drain $ $ VARIANT熔點+ 78 11 libdispatch.dylib 0x387b2dbc _dispatch_queue_invoke $ $ VARIANT mp + 36 12 libdispatch.dylib 0x387b391a _dispatch_root_queue_drain + 182 13 libdispatch名爲.dylib 0x387b3abc _dispatch_worker_thread2 + 80 14 libsystem_c.dylib 0x34097a0e _pthread_wqthread + 358 15 libsystem_c.dylib 0x340978a0 start_wqthread + 4

- (void)startupLocationManager 
{ 
    // startup location manager for background processing 
    if (self.locationManager == nil) 
    { 
     self.locationManager = [[CLLocationManager alloc] init]; 
     self.locationManager.delegate = self; 
     self.locationManager.distanceFilter = kCLDistanceFilterNone; 
     self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; 
     [self.locationManager startUpdatingLocation]; 

    } 
} 

- (void)stopLocationManager 
{ 
    if (self.locationManager) 
    { 
     [self.locationManager stopUpdatingLocation]; 
     self.locationManager.delegate = nil; 
     self.locationManager = nil; 

     if (self.isInBackground == YES) 
     { 
      [self startupLocationManager]; 
     } 
    } 
} 
+0

你有沒有想過這個問題? – Skotch

回答

1

我發現與來自其它帖子幫助的溶液。事實證明,這是一個時間問題。我創建了另一種重置我的位置管理器的方法,並且我延遲地調用它。這固定了一切。希望這也能幫助你。

- (void)stopLocationManager 
{ 
    if (locationManager) 
    { 
     [locationManager stopUpdatingLocation]; 
     [self performSelector:@selector(discardLocationManager) withObject:nil afterDelay:0.1]; 
    } 
} 

- (void) discardLocationManager 
{ 
    locationManager.delegate = nil; 
    locationManager = nil; 

    if (self.isRestart == YES) 
    { 
     [self performSelector:@selector(startupLocationManager) withObject:nil afterDelay:0.1]; 
    } 
} 
+3

請問您爲什麼需要延遲評論?你也可以分享你提到的其他職位的鏈接?謝謝。 – x89a10

+0

你能分享一下錯誤的場景嗎?我無法手動獲取錯誤。 @LittlePeculiar – alicanbatur

相關問題