-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Map crashes in airplane mode (iOS v3.0.1). #3280
Comments
I can't reproduce this with (I do see some strange flashing/stuttering while zooming and the marker image does not load, though.) Until offline support is implemented, the behavior in these types of situations is largely undefined and untested. Styles, sprites, vector tiles, and glyphs all typically require a network connection right now, which means that you may better off not showing the map at all if there's no connection. |
The error is coming from this line. @DejanRistic are you building your own custom copy of Mapbox GL? If so, are you changing the compiler settings in some way that could cause C++ exception handling to stop working correctly, e.g. disabling RTTI? |
@jfirebaugh We aren't doing anything custom actually. We are just using pods to pull in the iOS SDK. The crash above happens on either:
or
I assume those are the same at this point. The weird thing is that the crash does not happen when using:
Doing the same steps in 3.0.0 results in the following errors in the console but no crashes.
But when on 3.0.1 the crash happens instead. I know since 3.0.1 CocoaPods is now distributed via a static framework. But i'm not sure that could cause exceptions to stop working. Another thing to note is that we were able to get a similar crash sometimes by just switching to airplane mode while in the app and panning around (more rare). |
cc @1ec5 |
As @DejanRistic points out, we did switch to a static framework in 3.0.1 and start stripping more aggressively, as a stopgap until I land the dynamic framework in #3183. I don't know how just stuffing the static library inside a framework bundle would make any difference here, but perhaps the stripping that takes place in framework.sh effectively changes symbol visibility? (cc @incanus) |
I'm able to consistently reproduce what appears to be the same error on Android, using the test app. On a clean emulator (Nexus 5, API 23, x86):
Error:
Stack trace:
|
@DejanRistic, does the issue still reproduce if you instead install the Mapbox iOS SDK manually? What if you install the symbols package manually? |
I'm also able to reproduce this issue using CocoaPods and iOS. As soon as I view a map with airplane mode turned on, the app crashes. This is particularly bad in my case because my app is used for skiing, which many users turn on airplane mode before to save battery. Using SDK 3.0.1. |
@parrots, I’m curious whether you also see this issue in v3.1.0-pre.1. If you use this podspec to install the prerelease, you’ll get the version with debug symbols. Perhaps the presence of debug symbols makes all the difference. |
I’m having a lot of trouble getting that podspec to work. Changing the pod pod 'Mapbox-iOS-SDK', :podspec => ' and re-installing leads to a ton of build errors. [image: Screen Shot 2016-01-24 at 4.01.15 PM.png] On Sun, Jan 24, 2016 at 3:14 PM Minh Nguyễn notifications@github.com
|
I’m suspicious of this |
I have the same error. |
The airplane mode issue seems like it's resolved in 3.1.1! |
That’s great to hear, @johnnewman! Were you reproducing the issue consistently in previous versions? Also, can others confirm that upgrading to 3.1.1 addresses the issue? |
It seems to work fine in 3.1.0 as well. Builds before that seemed to cause a crash every time. |
Just tried to reproduce. When I load my satellite map in airplane mode all On Thu, Feb 18, 2016 at 4:01 PM John Newman notifications@github.com
|
The following custom builds skip the aggressive stripping we introduced in 0514082 for 3.0.1:
|
The crash trace in #3280 (comment) is no longer accurate due to refactoring, although it hints at the same throw site as #3280 (comment). If I set this conditional to @parrots and anyone else who still reproduces this issue, would you mind providing a gist of the crash you’re seeing? |
To be clear, printing an error message like "loading style failed: The Internet connection appears to be offline" is expected behavior. Subsequently crashing in |
@jfirebaugh I see both at the same time but only when my phones connected to the computer. I've just tested my app during commute to home and I can't reproduce this error. |
Just to add more fuel to the fire: I have a customer writing in with the following. Isn't limited to airplane mode, seems to be in any case were data is blocked. "Also I found that the app is always crashing when I have mobile data on outside the country, when I do this I get automatically forwarded to a provider specific website where I can buy data packages, if I don't do this the application will also receive wrong data and that causes it to crash." |
The map will crash every time when initializing when in airplane mode if the map has been loaded at least once. The map is just black if its a fresh install with airplane mode, but if its been loaded once before we get a crash.
Error:
StackTrace:
The text was updated successfully, but these errors were encountered: