MKMapView随机崩溃-VKMapCameraController

时间:2019-04-29 10:41:59

标签: ios mapkit mkmapview

我们在与地图相关的iOS应用中发生了大量崩溃。 Fabric的日志没有帮助。我们无法复制它,也无法找出围绕它的有效推理。

                                  0x20f34b530 objc_msgSend + 16
1  VectorKit                      0x2204a8e3c __97-[VKMapCameraController panWithOffset:relativeToScreenPoint:animated:duration:completionHandler:]_block_invoke.195 + 32
2  VectorKit                      0x2203c1574 -[VKAnimation stopAnimation:] + 124
3  VectorKit                      0x2203c5020 -[VKTimedAnimation stopAnimation:] + 48
4  VectorKit                      0x2203e7bc0 md::AnimationManager::stopAllAnimations() + 132
5  VectorKit                      0x22065e7d8 md::MapEngine::~MapEngine() + 148
6  VectorKit                      0x22065e73c md::MapEngine::~MapEngine() + 12
7  libobjc.A.dylib                0x20f3327cc object_cxxDestructFromClass(objc_object*, objc_class*) + 148
8  libobjc.A.dylib                0x20f3426b8 objc_destructInstance + 68
9  libobjc.A.dylib                0x20f342720 object_dispose + 16
10 QuartzCore                     0x2145df728 -[CALayer dealloc] + 128
11 VectorKit                      0x2203ccacc -[VKMapView dealloc] + 940
12 QuartzCore                     0x21457c340 CA::Transaction::commit() + 1208
13 QuartzCore                     0x21457ccf8 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
14 CoreFoundation                 0x2100e989c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
15 CoreFoundation                 0x2100e45c4 __CFRunLoopDoObservers + 412
16 CoreFoundation                 0x2100e4b40 __CFRunLoopRun + 1228
17 CoreFoundation                 0x2100e4354 CFRunLoopRunSpecific + 436
18 GraphicsServices               0x2122e479c GSEventRunModal + 104
19 UIKitCore                      0x23c550b68 UIApplicationMain + 212
20 trains                         0x102ed9940 main (NotificationManager.swift:20)
21 libdyld.dylib                  0x20fbaa8e0 start + 4

1 个答案:

答案 0 :(得分:0)

在我的情况下,这是在发生缩放动画并且我离开此地图视图时发生的。

我通过禁用动画来避免崩溃:

self.mapView.selectAnnotation(annotation, animated: false)
self.mapView.setCenter(annotation.coordinate, animated: false)