我自己无法重现此特定崩溃,但已通过我们的崩溃报告工具报告,并且我们的数百名用户都遇到过这种情况。发现很难调试或重现。
它发生在所有硬件平台上,但只发生在 iOS 6 上。我们将不胜感激任何帮助或见解。
异常类型:SIGSEGVCode:SEGV_ACCERR
Fatal Exception
Thread 0 Crashed
0 MapKit _remove(objc_object*, MKQuadTrieNode*) + 13
1 MapKit -[MKQuadTrie remove:] + 54
2 MapKit -[MKAnnotationContainerView observeValueForKeyPath:ofObject:change:context:] + 252
3 Foundation NSKeyValueNotifyObserver + 272
4 Foundation NSKeyValueWillChange + 572
5 Foundation -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 180
6 Foundation NSKVOForwardInvocation + 130
7 CoreFoundation ___forwarding___ + 626
8 CoreFoundation _CF_forwarding_prep_0 + 24
9 MapKit -[MKUserLocation _updateCoordinate] + 106
10 MapKit -[MKUserLocation setLocation:] + 106
11 MapKit -[MKMapView(UserPositioningInternal) locationManagerUpdatedLocation:] + 994
12 CoreFoundation -[NSArray makeObjectsPerformSelector:withObject:] + 206
13 MapKit -[MKLocationManager _reportLocationStatus:] + 66
14 MapKit -[MKLocationManager locationProvider:didUpdateLocation:] + 1540
15 MapKit -[MKCoreLocationProvider locationManager:didUpdateLocations:] + 864
16 CoreLocation -[CLLocationManager onClientEventLocation:] + 1614
17 CoreLocation __CLClientInvokeCallback_block_invoke_0 + 64
18 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
19 CoreFoundation __CFRunLoopDoBlocks + 160
20 CoreFoundation __CFRunLoopRun + 1450
21 CoreFoundation CFRunLoopRunSpecific + 356
22 CoreFoundation CFRunLoopRunInMode + 104
23 GraphicsServices GSEventRunModal + 74
24 UIKit UIApplicationMain + 1120
25 App Name main.m line 14 main + 14
最佳答案
尝试在您正在使用它的类的 dealloc 方法中将 locationManager 的委托(delegate)方法设置为 nil
像这样:
-(void) dealloc
{
self.locationManager.delegate = nil;
}
可能发生的情况是对象正在被释放(可能是由于内存不足)并且位置管理器正在尝试向不存在的委托(delegate)发送消息。
关于iphone - iOS 6 上的 MapKit 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13167065/