-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Random crashes when displaying MapView #5924
Comments
Thanks @irgendeinich. We've patched this in #5932
Can you please let us know what types of devices you see this issue happen on? Also, if you can provide any additional details about what you are doing in your MapView subclass that would be interesting for us to know as well. Also, it seems like you are building the library yourself. The Mapbox.framework.dSYM file is available in the build output and you should include it in your app's set of dSYMs for better stack traces in the future. In any case, ideally you would implement a similar guard of the apparent nil |
Thanks for responding so quickly.
Our MapView subclass just sets up the correct style url. The crash also doesn't always happen when the first MapView is displayed, it sometimes only happens on the second or third map, it also sometimes happens when
We are actually just using the regular dynamic framework release, and all the openGL related crashes do have proper symbols for Mapbox its just this issue where they are missing. |
Thanks for the additional information @irgendeinich. This issue was closed automatically when #5932 was merged. I'll open a new issue to investigate the missing symbol issue you described. |
Platform: iOS
Mapbox SDK version: 3.3.3
Steps to trigger behavior
Expected behavior
The MapView should be displayed and the app shouldn't crash
Actual behavior
The app crashes on some devices but not all
Stacktrace
This is the stacktrace I got from Crashlytics, sadly the symbols for Mapbox were not included.
Solution
I tracked the issue down to this line https://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/src/MGLAPIClient.m#L66
It seems the NSURLSession sometimes returns nil for the dataTask. Although I wasn't able to reproduce it on my end, making the method do nothing did fix all the crashes our app was experiencing.
The text was updated successfully, but these errors were encountered: