Ios MKMapView\u注释容器崩溃
我在iOS模拟器的MKMapView中看到了随机发生的崩溃。它不是由任何用户操作触发的,它只是凭空发生的。我得到以下堆栈跟踪:Ios MKMapView\u注释容器崩溃,ios,objective-c,mkmapview,mapkit,Ios,Objective C,Mkmapview,Mapkit,我在iOS模拟器的MKMapView中看到了随机发生的崩溃。它不是由任何用户操作触发的,它只是凭空发生的。我得到以下堆栈跟踪: <_NSCallStackArray 0x2d9762b0>( 0 ??? 0x137d69bd 0x0 + 326986173, 1 Foundation 0x03ca3b0a -[NSObject(NSKeyValueCoding)
<_NSCallStackArray 0x2d9762b0>(
0 ??? 0x137d69bd 0x0 + 326986173,
1 Foundation 0x03ca3b0a -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282,
2 Foundation 0x03c10b61 _NSGetUsingKeyValueGetter + 81,
3 Foundation 0x03c1019b -[NSObject(NSKeyValueCoding) valueForKey:] + 260,
4 AccessibilityUtilities 0x11ad1a3f -[NSObject(UIAccessibilitySafeCategory) safeValueForKey:] + 43,
5 MapKitFramework 0x12090aa4 -[MKBasicMapViewAccessibility(SafeCategory) accessibilityContainerElements] + 91,
6 UIAccessibility 0x11fc7149 -[NSObject(AXPrivCategory) accessibilityElementCount] + 34,
7 UIAccessibility 0x11fc751f -[NSObject(AXPrivCategory) _accessibilityHasOrderedChildren] + 59,
8 UIKit 0x11ebb388 -[UIViewAccessibility(SafeCategory) _accessibilitySubviewsForGettingElementsIncludingContainers:includingOpaqueElementProviders:] + 2269,
9 UIKit 0x11ebba96 -[UIViewAccessibility(SafeCategory) _accessibilityElementsInContainer:topLevel:includeKB:includeOpaqueElementProviders:] + 486,
10 UIKit 0x11eba12f -[UIViewAccessibility(SafeCategory) _accessibilityElementsInContainer:topLevel:includeKB:] + 64,
11 UIKit 0x11eba0ea -[UIViewAccessibility(SafeCategory) _accessibilityElementsInContainer:] + 57,
12 UIKit 0x11e9b097 -[UIApplicationAccessibility(SafeCategory) _accessibilityElementFirst:last:forFocus:] + 88,
13 UIKit 0x11e9b936 -[UIApplicationAccessibility(SafeCategory) _accessibilityFirstElement] + 57,
14 UIKit 0x11e9ea63 -[UIApplicationAccessibility(SafeCategory) accessibilityAttributeValue:] + 333,
15 UIAccessibility 0x11fbe3b9 _copyAttributeValueCallback + 151,
16 AXRuntime 0x1201f431 _AXXMIGCopyAttributeValue + 139,
17 AXRuntime 0x1201a300 _XCopyAttributeValue + 322,
18 AXRuntime 0x120256c8 mshMIGPerform + 256,
19 CoreFoundation 0x0447bdd5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53,
20 CoreFoundation 0x0447bb0b __CFRunLoopDoSource1 + 523,
21 CoreFoundation 0x044a67ec __CFRunLoopRun + 2156,
22 CoreFoundation 0x044a5b33 CFRunLoopRunSpecific + 467,
23 CoreFoundation 0x044a594b CFRunLoopRunInMode + 123,
24 GraphicsServices 0x04f849d7 GSEventRunModal + 192,
25 GraphicsServices 0x04f847fe GSEventRun + 104,
26 UIKit 0x010d294b UIApplicationMain + 1225,
27 Twinkie 0x000035d4 main + 228,
28 libdyld.dylib 0x04a3f725 start + 0
有没有关于如何解决这个问题的建议?为什么它要做可访问性的事情?我今天遇到了这个问题,并将其提交到
事实证明,这只是模拟器中的一个问题,如果在设备上构建,它不会出现。所以…不用担心了?希望苹果很快就能解决这个问题,但现在,你可以通过在设备上构建来解决这个问题。我现在通过执行以下操作来解决这个问题:
#if TARGET_IPHONE_SIMULATOR
@interface UIView (FixIt) @end
@implementation UIView (FixIt)
- (id)_annotationContainer
{
return nil;
}
@end
#endif
<MKMapView: 0x123dd080; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x1d89c840>; layer = <CALayer: 0x123dd1f0>>
| <UIView: 0x123dd690; frame = (0 0; 320 568); autoresizesSubviews = NO; gestureRecognizers = <NSArray: 0x253f0270>; layer = <CALayer: 0x123dd6f0>>
| | <MKBasicMapView: 0x123dd720; frame = (0 0; 320 568); clipsToBounds = YES; layer = <CALayer: 0x123dd850>>
| | | <_MKMapLayerHostingView: 0x123dd7a0; frame = (0 0; 320 568); layer = <_MKMapLayerHostingLayer: 0x123ddb00>>
| | | | <VKMapView: 0x123ddf40> (layer)
| | | | | <VKMapCanvas: 0x18826ab0> (layer)
| | | | | | <VGLLayer: 0x18824510> (layer)
| | <MKScrollContainerView: 0x253499e0; frame = (-407522 -982166; 2.5318e+06 2.5318e+06); autoresizesSubviews = NO; layer = <CALayer: 0x2534d0e0>>
| | | <MKOverlayContainerView: 0x1d8cdef0; frame = (0 0; 2.5318e+06 2.5318e+06); transform = [0.0094316732, 0, 0, 0.0094316732, 0, 0]; layer = <CALayer: 0x1d8cdfc0>>
etc...
#if TARGET_IPHONE_SIMULATOR
@interface UIView (FixIt) @end
@implementation UIView (FixIt)
- (id)_annotationContainer
{
return nil;
}
@end
#endif