据crashlytics报道,我们的应用程序有相当多的崩溃发生在用户身上,但是我们无法在我们的一端重现它。以下是完整的崩溃报告:
Crashed: com.apple.main-thread
0 TheBarCode 0x100ccc2d8 gmscore::renderer::GLState::Flush() + 16388
1 TheBarCode 0x100cd7630 gmscore::renderer::GLScopedContext::~GLScopedContext() + 31600
2 TheBarCode 0x100d3a314 -[GMSEntityRendererView setFrame:] + 436308
3 TheBarCode 0x100d82578 -[GMSVectorMapView setFrame:] + 184912
4 UIKitCore 0x18f6af878 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 576
5 UIKitCore 0x18f6b0510 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 236
6 CoreFoundation 0x18b18195c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
7 CoreFoundation 0x18b084fb0 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
8 UIKitCore 0x18f6af5e4 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
9 UIKitCore 0x18f6b082c -[UIView(Geometry) setBounds:] + 688
10 UIKitCore 0x18f6b00e0 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 528
11 UIKitCore 0x18f6b04ac -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 136
12 CoreFoundation 0x18b18195c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
13 CoreFoundation 0x18b084fb0 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 416
14 UIKitCore 0x18f6af5e4 -[UIView(Geometry) resizeSubviewsWithOldSize:] + 156
15 UIKitCore 0x18f5f76fc -[UIView(AdditionalLayoutSupport) _is_layout] + 148
16 UIKitCore 0x18f6b7090 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1032
17 Gradientable 0x101738798 UIView.swizzled_layoutSubviews() + 50 (Gradientable.swift:50)
18 Gradientable 0x1017388d0 @objc UIView.swizzled_layoutSubviews() + 4359784656 (<compiler-generated>:4359784656)
19 UIKitCore 0x18f6ca17c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2140
20 QuartzCore 0x191c322c0 -[CALayer layoutSublayers] + 284
21 QuartzCore 0x191c3843c CA::Layer::layout_if_needed(CA::Transaction*) + 480
22 QuartzCore 0x191c43140 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 136
23 QuartzCore 0x191b8b884 CA::Context::commit_transaction(CA::Transaction*, double) + 304
24 QuartzCore 0x191bb5574 CA::Transaction::commit() + 676
25 QuartzCore 0x191bb5f68 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 92
26 CoreFoundation 0x18b12be68 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
27 CoreFoundation 0x18b126d54 __CFRunLoopDoObservers + 416
28 CoreFoundation 0x18b127320 __CFRunLoopRun + 1308
29 CoreFoundation 0x18b126adc CFRunLoopRunSpecific + 464
30 GraphicsServices 0x1950c7328 GSEventRunModal + 104
31 UIKitCore 0x18f23463c UIApplicationMain + 1936
32 TheBarCode 0x10082756c main + 21 (Preference.swift:21)
33 libdyld.dylib 0x18afb0360 start + 4另一件奇怪的事情是,我们没有收到任何额外的添加(在哪个屏幕上发生)与崩溃一起的日志。
其他信息:
最近,我们升级了iOS 13和Xcode11的应用程序,同时也将google maps iOS SDK升级到了3.8.0。升级后,我们收到崩溃报告。在以前使用的版本中,我们从未遇到过这种崩溃,即2.7.0
在我们的应用程序中,我们有多个GMSMapView实例,即在一个UIPageViewController中嵌入了大约8个实例。为了便于内存管理,我们在视图控制器的viewDidDisappear方法中只保留了GMSMapView的可视版本,而丢弃了其他实例。这是我们用来设置地图和清除地图的代码。
func setupMapView() {
let mapView = GMSMapView(frame: CGRect.zero)
mapView.settings.allowScrollGesturesDuringRotateOrZoom = false
if CLLocationManager.authorizationStatus() != .notDetermined {
mapView.settings.myLocationButton = false
mapView.isMyLocationEnabled = true
self.myLocationButtonContainer.isHidden = false
} else {
self.myLocationButtonContainer.isHidden = true
}
self.mapContainer.insertSubview(mapView, at: 0)
mapView.autoPinEdgesToSuperviewEdges()
let iconGenerator = GMUCustomClusterIconGenerator()
let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm()
let renderer = GMUDefaultClusterRenderer(mapView: mapView, clusterIconGenerator: iconGenerator)
renderer.delegate = self
self.clusterManager = GMUClusterManager(map: mapView, algorithm: algorithm, renderer: renderer)
self.clusterManager?.setDelegate(self, mapDelegate: self)
self.mapView = mapView
self.setUpMarkers()
self.restoreMapCameraPosition(animated: false)
}
func clearMapView() {
self.clusterManager?.clearItems()
self.mapView?.clear()
self.mapView?.removeFromSuperview()
self.mapView = nil
self.clusterManager = nil
}来自crashlytics的截图:

来自crashlytics的data选项卡的屏幕截图:

发布于 2020-03-26 01:22:37
只需降级到3.7.0 iOS地图开发工具包。
pod 'GoogleMaps', '~> 3.7.0'https://stackoverflow.com/questions/60826254
复制相似问题