You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[Android] Invalid LatLng bounds in OfflineRegion causes JNI failure #8514
Hey there guys. This is a big one that I've just come across in 4.2.2. Unfortunately, all I have is a stack trace for you, and I can't test (or really reproduce this) on to 5.0.0 to try out because of #8497 .
From what I can tell, this was the flow:
Fired up an offline region to download with a specific style (one of our own)
Started bouncing around our app to test something map related (just display a map in this case)
When it came time to show the map, the error: "failed to load style (timeout)" came up, and the callback for 'onMapReady' never hit.
Without the mapboxMap from onMapReady, one of my features crashed.
On loading up the app again and trying to figure out why I didn't have the mapboxMap instance, the app crashed a few seconds later (while trying to download an offline region) in the JNI stack.
A little worried about this one, as we use offline regions pretty extensively and need to understand how this might affect our launch of our new feature set. Any help is greatly appreciated!
Check out those whacky bounds, eh? Not sure how that happened. I double-triple checked that the coordinates we're feeding in for the lat-lng bounds are good, and it does indeed seem to be. I'll dig a little deeper to see what else I can find.
Aha! Dev failure for the win. Turns out it absolutely was my fault - I had a very simple calculation problem when creating the LatLng bounds for the offline region.
So it looks like this is repairable on our end, but it definitely still seems like an issue that could impact users of the SDK. Maybe having some simple exception thrown when the bounds are detected to be invalid?
changed the title [-][Critical][Android] Failure in style loading causes JNI crash[/-][+][Android] Invalid LatLng bounds causes JNI failure[/+]on Mar 23, 2017
Activity
tikimcfee commentedon Mar 23, 2017
Got some more info for ya. So I'm running through our offline manager for the OfflineManager (hah), and this region seems to be causing the problem:
Check out those whacky bounds, eh? Not sure how that happened. I double-triple checked that the coordinates we're feeding in for the lat-lng bounds are good, and it does indeed seem to be. I'll dig a little deeper to see what else I can find.
tikimcfee commentedon Mar 23, 2017
Aha! Dev failure for the win. Turns out it absolutely was my fault - I had a very simple calculation problem when creating the LatLng bounds for the offline region.
So it looks like this is repairable on our end, but it definitely still seems like an issue that could impact users of the SDK. Maybe having some simple exception thrown when the bounds are detected to be invalid?
[-][Critical][Android] Failure in style loading causes JNI crash[/-][+][Android] Invalid LatLng bounds causes JNI failure[/+][-][Android] Invalid LatLng bounds causes JNI failure[/-][+][Android] Invalid LatLng bounds in OfflineRegion causes JNI failure[/+]