Status Update
Comments
an...@google.com <an...@google.com> #2
qu...@gmail.com <qu...@gmail.com> #3
qu...@gmail.com <qu...@gmail.com> #4
an...@google.com <an...@google.com>
di...@google.com <di...@google.com> #5
Hi,
We are also experiencing this crash using Google Maps SDK 3.8.0 for iOS. We recently released a BETA version of our app with TestFlight and users are reporting severe crashes happening since when we included the map in the main view controller of our app. We identified the crash issue with Firebase and by performing a quick search of the problem it appears we are not the only one experiencing it: We are using Objective-C in our app, and while I cannot share the full code of the view controller due to company policies, this is how we are creating the map in our code:
_mapView = [GMSMapView new];
_mapView.delegate = self;
_mapView.myLocationEnabled = NO;
_mapView.mapType = kGMSTypeNormal;
_mapView.settings.scrollGestures = NO;
_mapView.settings.zoomGestures = NO;
_mapView.settings.tiltGestures = NO;
_mapView.settings.rotateGestures = NO;
_mapView.settings.compassButton = NO;
_mapView.settings.myLocationButton = NO;
_mapView.translatesAutoresizingMaskIntoConstraints = NO;
The GMSMapView
is the attached to the UIViewController
view using Autolayout constraints. We are also performing any sort of resources cleanup, like removing the map when the view controller view is not visibile anymore (viewWillDisappear:
) and when the application resign active. Everything is configured inside the viewWillAppear:
.
We also were not able to reproduce the issue on our end, although our BETA testers are reporting the crashes to happen quite frequently. This is the stacktrace of the crash logged on Firebase:
Crashed: com.apple.main-thread
0 appname 0x1016b697c gmscore::renderer::GLState::Flush() + 17080
1 appname 0x1016c1ce4 gmscore::renderer::GLScopedContext::~GLScopedContext() + 31628
2 appname 0x101724c10 -[GMSEntityRendererView setFrame:] + 436920
3 appname 0x10176d500 -[GMSVectorMapView setFrame:] + 185672
4 UIKitCore 0x18ac19168 -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:] + 600
5 UIKitCore 0x18ac19e28 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 240
6 CoreFoundation 0x1865f04e0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
7 CoreFoundation 0x1864ee084 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 432
8 UIKitCore 0x18ac18ebc -[UIView(Geometry) resizeSubviewsWithOldSize:] + 172
9 UIKitCore 0x18ac1a158 -[UIView(Geometry) setBounds:] + 704
10 UIKitCore 0x18ac19a00 -[UIView(Geometry) _applyISEngineLayoutValuesToBoundsOnly:] + 532
11 UIKitCore 0x18ac19dc4 -[UIView(Geometry) _resizeWithOldSuperviewSize:] + 140
12 CoreFoundation 0x1865f04e0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
13 CoreFoundation 0x1864ee084 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 432
14 UIKitCore 0x18ac18ebc -[UIView(Geometry) resizeSubviewsWithOldSize:] + 172
15 UIKitCore 0x18ab5b580 -[UIView(AdditionalLayoutSupport) _is_layout] + 152
16 UIKitCore 0x18ac20ce8 -[UIView(Hierarchy) _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 1056
17 UIKitCore 0x18ac346a0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2168
18 QuartzCore 0x18d2874a0 -[CALayer layoutSublayers] + 292
19 QuartzCore 0x18d2878e0 CA::Layer::layout_if_needed(CA::Transaction*) + 472
20 QuartzCore 0x18d299dc4 CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 144
21 QuartzCore 0x18d1de884 CA::Context::commit_transaction(CA::Transaction*, double) + 304
22 QuartzCore 0x18d2093d0 CA::Transaction::commit() + 656
23 UIKitCore 0x18a760d80 _UIApplicationFlushRunLoopCATransactionIfTooLate + 116
24 UIKitCore 0x18a806d0c __handleEventQueueInternal + 6120
25 UIKitCore 0x18a7fec88 __handleHIDEventFetcherDrain + 144
26 CoreFoundation 0x186599860 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
27 CoreFoundation 0x1865997b4 __CFRunLoopDoSource0 + 84
28 CoreFoundation 0x186598f68 __CFRunLoopDoSources0 + 296
29 CoreFoundation 0x186593ca4 __CFRunLoopRun + 796
30 CoreFoundation 0x186593660 CFRunLoopRunSpecific + 480
31 GraphicsServices 0x1909a4604 GSEventRunModal + 164
32 UIKitCore 0x18a76815c UIApplicationMain + 1944
33 appname 0x100a8019c main + 16 (main.m:16)
34 libdyld.dylib 0x18640f1ec start + 4
Also, while firebase reports the crashes to happen then the app is in Foreground, our BETA testers are reporting the crashes to happen while the app is in background (or woken up from background), which is quite odd since are removing the map from the viewport when the app goes in background mode:
[self.mapView removeFromSuperview];
[self.mapView clear];
self.mapView = nil;
I'm also attaching a screenshot of the crash count reported on Firebase to give you a general idea of the impact of the crashes in our app. I'll be happy to provide more data to help you address this issue.
qu...@gmail.com <qu...@gmail.com> #6
We downgraded to version 3.7.0 and the issue seems to be gone (even though in the release notes of version 3.8.0 it's mentioned no changes)
di...@google.com <di...@google.com>
di...@google.com <di...@google.com>
di...@google.com <di...@google.com> #7
di...@google.com <di...@google.com> #8
I applied one of the workarounds mentioned in that issue, and I upgraded the SDK to the latest version (to be on the same page). But now we are having this new issue.
Description
Using latest version of Google maps pod for ios
Issue report
----------------
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1818dad8c __exceptionPreprocess
1 libobjc.A.dylib 0x180a945ec objc_exception_throw
2 CoreFoundation 0x1818e8098 __methodDescriptionForSelector
3 CoreFoundation 0x1818e05c8 ___forwarding___
4 CoreFoundation 0x1817c641c _CF_forwarding_prep_0
5 CoreData 0x1841b3bcc -[NSSQLForeignKey initWithEntity:toOneRelationship:]
6 CoreData 0x1841b38bc -[NSSQLToOne initWithEntity:propertyDescription:virtualForToMany:]
7 CoreData 0x1841b1da0 -[NSSQLEntity _generateProperties]
8 CoreData 0x1841ae938 -[NSSQLModel _generateModel:error:]
9 CoreData 0x18431c89c -[NSSQLModel initWithManagedObjectModel:configurationName:retainHashHack:brokenHashVersion:entityIDOffset:]
10 CoreData 0x1841acbc0 -[NSSQLCore initWithPersistentStoreCoordinator:configurationName:URL:options:]
11 CoreData 0x1842b8f30 __91-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]_block_invoke
12 CoreData 0x1842c6fb0 gutsOfBlockToNSPersistentStoreCoordinatorPerform
13 libdispatch.dylib 0x1811cca60 _dispatch_client_callout
14 libdispatch.dylib 0x181209ed4 _dispatch_queue_barrier_sync_invoke_and_complete
15 CoreData 0x1842b53dc _perform
16 CoreData 0x1841aae20 -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]
17 Quickride 0x10511f9ec -[GMSCacheStorage initWithCacheStorageDescriptor:didReset:]
18 Quickride 0x10511f260 -[GMSCacheStorageDescriptor cacheStorage]
19 Quickride 0x10527afa4 __47-[GMSTileDataCache startWithCompletionHandler:]_block_invoke
20 CoreData 0x18427c554 developerSubmittedBlockToNSManagedObjectContextPerform
21 libdispatch.dylib 0x1811cca60 _dispatch_client_callout
22 libdispatch.dylib 0x18120b1d4 _dispatch_queue_serial_drain$VARIANT$armv81
23 libdispatch.dylib 0x18120baf8 _dispatch_queue_invoke$VARIANT$armv81
24 libdispatch.dylib 0x18120c49c _dispatch_root_queue_drain_deferred_wlh$VARIANT$armv81
25 libdispatch.dylib 0x18121446c _dispatch_workloop_worker_thread$VARIANT$armv81
26 libsystem_pthread.dylib 0x1814ffe70 _pthread_wqthread
27 libsystem_pthread.dylib 0x1814ffb08 start_wqthread