I have a MapView with many MKMarkerAnnotationViews (about 300). iOS 11 clustering support enabled. After some scrolling and zooming through the MapView my app crashes because MapKit crashes.
When I see the crashlog I am sure this is not a crash in my code but in MapKit itself. Do you think this estimation is correct? Does anyone see this crash too?
This is the crashlog:
Last Exception Backtrace:
0 CoreFoundation 0x186f4bd38 __exceptionPreprocess + 124
1 libobjc.A.dylib 0x186460528 objc_exception_throw + 55
2 CoreFoundation 0x186ee4c44 _CFThrowFormattedException + 111
3 CoreFoundation 0x186e19ff4 -[__NSDictionaryM setObject:forKey:] + 855
4 MapKit 0x197329930 -[MKNewAnnotationContainerView _existingClusterViewsForClusterID:] + 171
5 MapKit 0x1973291ec -[MKNewAnnotationContainerView addAnnotationView:allowAnimation:] + 171
6 MapKit 0x1972b9040 -[MKMapView addAnnotationRepresentation:allowAnimation:] + 687
7 MapKit 0x197277d14 -[MKAnnotationManager _addRepresentationForAnnotation:] + 843
8 MapKit 0x19729b63c -[MKAnnotationManager addRepresentationsForAnnotations:] + 351
9 MapKit 0x1972b1f7c -[MKMapView annotationContainer:requestAddingClusterForAnnotationViews:] + 631
10 MapKit 0x197329ad8 -[MKNewAnnotationContainerView _updateClusterableAnnotationViews:withID:] + 395
11 CoreFoundation 0x186e1a6cc -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 231
12 MapKit 0x19732a698 -[MKNewAnnotationContainerView updateAnnotationViewsForReason:] + 295
13 MapKit 0x197279cfc -[MKAnnotationContainerView finishAddingAnnotationViews] + 31
14 MapKit 0x1972b9658 -[MKMapView annotationManager:didAddAnnotationRepresentations:] + 59
15 MapKit 0x1972769b0 -[MKAnnotationManager updateVisibleAnnotations] + 1491
16 MapKit 0x197291620 -[MKMapView _didChangeRegionMidstream:] + 243
17 MapKit 0x1972addf0 -[MKMapView mapLayer:didChangeRegionAnimated:] + 71
18 VectorKit 0x196c60690 -[VKMapView map:didChangeRegionAnimated:] + 143
19 MapKit 0x197321430 -[MKMapGestureController _handleStandardPan:] + 1579
20 MapKit 0x197295cfc -[MKMapGestureController handlePan:] + 19
21 UIKit 0x1909e7f78 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 63
22 UIKit 0x1909ec4dc _UIGestureRecognizerSendTargetActions + 123
23 UIKit 0x1904d6dc8 _UIGestureRecognizerSendActions + 319
24 UIKit 0x19038b748 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 731
25 UIKit 0x1909d63fc _UIGestureEnvironmentUpdate + 1055
26 UIKit 0x1909d5f88 -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] + 403
27 UIKit 0x1909d50e4 -[UIGestureEnvironment _updateGesturesForEvent:window:] + 275
28 UIKit 0x190389a54 -[UIWindow sendEvent:] + 3179
29 UIKit 0x19035b078 -[UIApplication sendEvent:] + 339
30 UIKit 0x190c9af98 __dispatchPreprocessedEventFromEventQueue + 2363
31 UIKit 0x190c9d408 __handleEventQueueInternal + 4759
32 UIKit 0x190c96574 __handleHIDEventFetcherDrain + 151
33 CoreFoundation 0x186ef4358 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 23
34 CoreFoundation 0x186ef42d8 __CFRunLoopDoSource0 + 87
35 CoreFoundation 0x186ef3b60 __CFRunLoopDoSources0 + 203
36 CoreFoundation 0x186ef1738 __CFRunLoopRun + 1047
37 CoreFoundation 0x186e122d8 CFRunLoopRunSpecific + 435
38 GraphicsServices 0x188ca3f84 GSEventRunModal + 99
39 UIKit 0x1903be880 UIApplicationMain + 207
40 Bookshelf 0x10086ce14 0x100850000 + 118292
41 libdyld.dylib 0x18693656c start + 3
This happens on a iPhone 5s with iOS 11. I can reproduce this for all iOS 11 releases including the current ios 11.1 beta 2.