繁体   English   中英

在iOS 6上使用MapKit崩溃

[英]Crash with MapKit on iOS 6

我自己无法重现此特定的崩溃,但已通过我们的崩溃报告工具进行了报告,并且已有数百名用户体验到。 发现很难调试或复制。

它发生在所有硬件平台上,但仅在iOS 6上发生。我们将不胜感激任何帮助或见解。

异常类型:SIGSEGV代码: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的委托方法设置为nil。

像这样:

-(void) dealloc
{
    self.locationManager.delegate = nil;
}

可能发生的情况是该对象正在被释放(可能是由于内存不足),并且位置管理器正在尝试向不存在的委托发送消息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM