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 TestApp Crashing When MapView Is Loaded #5108
Copy link
Copy link
Closed
Milestone
Description
After updating to the latest on master 25c4436 and running the TestApp on a Samsung S5 (API 21) the app crashes when any Activity with a MapView is loaded. The error (see stacktrace below) points to an issue with the geojsonvt, and not the still open issue about switching arm64 to use gold instead of bfd as the Samsung S5 is 32 bit. I've tried checking out the previous version of mason c03b19241ad6450dab16bf06466f849cb5a15757 and rebuilding with the same issue happening. Based on that it's unclear to me if this is related to the new NDK version in #5092 .
Steps To Reproduce
- Update code to 25c4436
- Update Git submodules
- Make Android
make cleanmake android
- Run TestApp on arm device
- Choose Polygon activity (any will do it, but for consistency in debugging let's focus on this one)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN6mapbox9geojsonvt7Convert11projectRingERKNSt6__ndk16vectorINS0_6LonLatENS2_9allocatorIS4_EEEEd" referenced by "libmapbox-gl.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:989)
at com.mapbox.mapboxsdk.maps.NativeMapView.<clinit>(NativeMapView.java:44)
at com.mapbox.mapboxsdk.maps.MapView.initialize(MapView.java:203)
at com.mapbox.mapboxsdk.maps.MapView.<init>(MapView.java:166)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:614)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.mapbox.mapboxsdk.testapp.activity.offline.OfflineActivity.onCreate(OfflineActivity.java:64)
at android.app.Activity.performCreate(Activity.java:6221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2614)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5835)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) /cc @tmpsantos @kkaefer @jfirebaugh @zugaldia @tobrun @cammace @danswick
Activity
jfirebaugh commentedon May 23, 2016
@kkaefer Did you rebuild the Android geojsonvt binaries as part of mapbox/mason@72f30dd? If so, and if we don't have a quick fix for this, we should roll back that commit, and the binaries.
bleege commentedon May 23, 2016
I checked out the latest commit prior the NDK update in master ( 7272d7c ), updated the git submodule, made the SDK / TestApp, and successfully ran it on the Samsung S5. This tells me that @jfirebaugh is on the right path.
jfirebaugh commentedon May 23, 2016
Hmm, that's inconsistent with what you earlier reported @bleege. Building on 7272d7c should be exactly equivalent to building with the prior mason hash, because the only change in 25c4436 was updating the mason hash.
The reason I said the binaries could be the issue is because you said that reverting mason didn't help. If the binaries changed in an incompatible manner, than reverting mason wouldn't completely resolve the issue, because the binaries are stored on S3.
So we need to conclusively determine whether or not reverting 25c4436 resolves the issue, as you are now reporting, or whether it does not, as you reported in the initial description.
bleege commentedon May 24, 2016
Yeah, this is an odd one. I'll give things another try with
masterand see where it leads. Below is the steps I followed to get the "working" version that I previously mentioned.The original attempt to use the "old" Mason dependencies with the latest from
masterwas:bleege commentedon May 24, 2016
I just did a clean build from
masterand updated.masonand it errored out again with a similar stack trace. Here's my steps:Here's the stack trace from this:
mpuchala commentedon May 24, 2016
Same here just after updating to new snapshot release.
dariav commentedon May 24, 2016
Having the same issue as @mpuchala
bleege commentedon May 24, 2016
Discussed internally and decided to revert the Android NDK update commit 25c4436 for now so that development can continue.
bleege commentedon May 24, 2016
I reverted the Android NDK commit, rebuilt locally, and successfully tested the TestApp on a Samsung S5. The reverted commit is 6abd3d7 on
masternow.The next step is to create a new ticket to upgrade to the latest NDK and start work on it after
4.1.0 FINALships.jfirebaugh commentedon Jun 1, 2016
This has regressed on
masterbecause we've re-updated mason, which again pulled in NDK r11c. We need to revert the update in mason itself.