Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapBox crashes at [MGL_MMELocationManager startBackgroundTimeoutTimer] (MMELocationManager.m:158) #50

Closed
ghost opened this issue Jul 2, 2018 · 19 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Jul 2, 2018

We have a lot of crashes with this report.

Maybe I should mention that 2 of 3 apps work fine with the mapbox release 4.1. The app which makes problems has this property MGLMapboxMetricsEnabledSettingShownInApp = true

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString setBackgroundLocationServiceTimeoutAllowedDate:]: unrecognized selector sent to instance 0x102c52820'

Code Type:       ARM-64
Parent Process:  ??? [1]

Date/Time:       2018-06-29T12:29:02Z
Launch Time:     2018-06-29T12:28:47Z
OS Version:      iPhone OS 11.2.6 (15D100)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x4c98abeb8
Crashed Thread:  0

Application Specific Information:
objc_msgSend() selector name: setBackgroundLocationServiceTimeoutAllowedDate:

Thread 0 Crashed:
0   libobjc.A.dylib                      0x0000000183aa8430 objc_msgSend + 16
1   Mapbox                               0x0000000101adb680 -[MGL_MMELocationManager startBackgroundTimeoutTimer] (MMELocationManager.m:158)
2   Mapbox                               0x0000000101adb8b8 -[MGL_MMELocationManager locationManager:didUpdateLocations:] (MMELocationManager.m:183)
3   CoreLocation                         0x000000018ae497bc CLClientRetrieveData + 77408
4   CoreLocation                         0x000000018ae4901c CLClientRetrieveData + 75456
5   CoreLocation                         0x000000018ae316b4 CLClientInvalidate + 1000
6   CoreFoundation                       0x00000001847f3590 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
7   CoreFoundation                       0x00000001847f2e60 __CFRunLoopDoBlocks + 284
8   CoreFoundation                       0x00000001847f10c8 __CFRunLoopRun + 2432
9   CoreFoundation                       0x0000000184710c58 CFRunLoopRunSpecific + 432
10  GraphicsServices                     0x00000001865bcf84 GSEventRunModal + 96
11  UIKit                                0x000000018de695c4 UIApplicationMain + 232
12  myapp                            0x000000010065c424 main (AppDelegate.swift:13)
13  libdyld.dylib                        0x000000018423056c start + 0
@rclee
Copy link
Contributor

rclee commented Jul 3, 2018

Hi @wolfgang-moovel,

Thanks for the report and the provided detail. We're investigating this issue now -- if possible could you provide us with some steps to reproduce this crash or if you notice any patterns associated with the crash? Also, what dependencies you're using would be helpful.

@ghost
Copy link
Author

ghost commented Jul 4, 2018

This crash is random. We could reproduce it on one device and it directly crashed after the map loaded. After 4 crashes, the app was running fine. We're still observing a high amount of crashes with the same crash report. As a result we downgraded back to Mapbox v1.8.7, where we couldn't see the crash.
Other apps with mapbox v1.4.1 are running fine. The only difference is the missing flag MGLMapboxMetricsEnabledSettingShownInApp = true.

@shebtreq
Copy link

shebtreq commented Jul 8, 2018

We have the exact same issue in our app but flag "MGLMapboxMetricsEnabledSettingShownInApp": YES is missing in the info.plist file

@rclee
Copy link
Contributor

rclee commented Jul 9, 2018

@wolfgang-moovel @shebtreq Are you using any other Mapbox dependencies within your applications that have experienced this crash?

@lludo
Copy link

lludo commented Jul 10, 2018

I also have the same crash. My pods are:

  pod 'Alamofire', 	        '~> 4.7'
  pod 'Fabric',			'~> 1.7'
  pod 'Crashlytics',		'~> 3.10'
  pod 'LocoKit',		'~> 5.2'
  pod 'LocoKit/LocalStore',	'~> 5.2'
  pod 'Mapbox-iOS-SDK', 	'~> 4.0'
  pod 'SwiftNotes', 		'~> 1.1'

@rclee
Copy link
Contributor

rclee commented Jul 17, 2018

Hi @lludo, @shebtreq, and @wolfgang-moovel

Sorry for the delay here. We're continuing to search for a solution but haven't had any luck with replicating the crash on our end. We have an experimental branch; it would be great if you could try it out and let us know if it fixes your issue.

pod 'Mapbox-iOS-SDK', :git => 'https://github.com/mapbox/mapbox-gl-native.git', :branch => 'jrex-events-timeout-handler'

https://github.com/mapbox/mapbox-gl-native/tree/jrex-events-timeout-handler

@samuelm77
Copy link

samuelm77 commented Jul 18, 2018

Same random crashes for me (iOS 11). I will try the experimental branch asap.
My Mapbox pods are:

pod 'Mapbox-iOS-SDK', '4.1'
pod 'MapboxNavigation', '0.18'
pod 'MapboxGeocoder.swift', '0.8.1'

@samuelm77
Copy link

samuelm77 commented Jul 18, 2018

  • I added pod 'Mapbox-iOS-SDK', :git => 'https://github.com/mapbox/mapbox-gl-native.git', :branch => 'jrex-events-timeout-handler' in my Podfile
  • I ran pod install
  • But I then got this error: [!] Unable to find a specification for 'Mapbox-iOS-SDK'.

Removing Cocoapods cache does not help

@friedbunny
Copy link
Contributor

friedbunny commented Jul 18, 2018

Unfortunately, mapbox-gl-native is a complex repo that CocoaPods cannot build from source, so it’s not possible to specify arbitrary git branches/hashes in a podfile — to test unmerged changes, one has to build the SDK themselves.

@rclee
Copy link
Contributor

rclee commented Jul 18, 2018

@samuelm77 I was getting a similar error when testing this myself. You could also try running pod setup and see if that works for you.

@samuelm77
Copy link

@rclee I tried but that did not help.

@fedeojeda95
Copy link

fedeojeda95 commented Jul 19, 2018

I'm having exactly the same problem as @samuelm77. It showing [!] Unable to find a specification for 'Mapbox-iOS-SDK'..

Installing it by defining the podspec seems to work though: pod 'Mapbox-iOS-SDK', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/jrex-events-timeout-handler/platform/ios/Mapbox-iOS-SDK.podspec'.

Nevertheless, I've tried the fix and it's still crashing, exactly the same crash that happened before on startBackgroundTimeoutTimer

@salardstn
Copy link

I have the same issue.

@rclee
Copy link
Contributor

rclee commented Aug 20, 2018

This has been a tricky crash to pinpoint since we're unable to replicate on our end. We have been working with other users experiencing this issue to come to a faster solution. We will hopefully have a patch ready soon. Thank you for your patience while we work to resolve this issue.

@kozyr
Copy link

kozyr commented Aug 20, 2018

Same issue for me while using 4.1.1 with Mapbox Navigation 0.18. If it helps, I've a bunch of crash reports.

@ghost
Copy link
Author

ghost commented Sep 2, 2018

I'm having the exact problem on 4.3.0. Is a fix coming? @rclee

@rclee
Copy link
Contributor

rclee commented Sep 4, 2018

We'll be rolling out a few fixes in the next release. This should hopefully resolve all the issues we're seeing here. A beta should be available this week to try if you wish and then a release the following week. Thank you for your patience.

@ghost
Copy link
Author

ghost commented Sep 6, 2018

@rclee I installed 4.4.0 Beta 1. Still crashing 😔
screen shot 2018-09-06 at 2 17 03 pm

@andrlee andrlee added this to the Sprint-9/14 milestone Sep 10, 2018
@rclee
Copy link
Contributor

rclee commented Sep 17, 2018

We've recently released 4.4.1 of the Mapbox iOS SDK. If you have the opportunity to test this new version and provide feedback then it would be appreciated. If you are also using the Navigation SDK - then please wait for the next navigation release.

@andrlee andrlee closed this as completed Sep 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants