-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Missing arm64 lib #3128
Comments
Thank you @leofarage for the report. Just to clarify, you're only seeing this message on 64bits devices, right? I just tried a fresh build on a Nexus 6p which is a 64 bits device and I couldn't reproduce the issue (see screenshot below). Could you tell us the steps you follow to reproduce this crash? That'd help us troubleshoot the root cause of it. Also, are you seeing this crash with every run, or just during the first time you try to launch the app? |
@leofarage Yep, the Mapbox Android SDK don't ship an As some background, we regularly develop and test using 64 bit Android devices specifically the Samsung S6 and HTC M9. That's not to say there isn't an issue but I just wanted to let you know that we regularly run it on 64 bit devices (in addition to 32 bit devices). |
My project has a few other libraries that are being used -- possibly forcing the use of 64 bits .so? I tested on the Samsung Galaxy S6 and S6 Edge and both crashed. I'm attaching in the end of the comment the libraries used in the project. Both devices crashes on entering the project's MapActivity. The map Activity's layout is made of 2 fragments -- one fragment containing the MapView defined using xml and the other fragment has a recycler view using a Horizontal LinearLayoutManager. Both fragments are child of a RelativeLayout where the MapFragment takes the whole parent and the RecyclerViewFragment takes just 1/4 of the bottom part of the parent -- overlapping the map. As I mentioned this repository's example app crashes the same way as my project does. I really don't know what I could be doing wrong. Thanks for taking the time for trying to solve my issue. Here are the libraries used in the project:
|
Ah... one thing to check is to make sure that a germane ABI .so is being generated for the device / emulator that it'll run on. They'll show up in the ABI are created using the
Very possible. If one of those libraries ships an |
Hi, sorry for taking so long to answer -- I was out of the office. Anyhow, I found out that the Card.IO library packs the 64 bits libs, consequently it creates a arm64-v8a folder inside the libs folder of the app. After removing it from the app the UnsatisfiedLinkError disappeared, instead a new error appeared:
This test was done using a Samsung Galaxy S6 Edge running Android 5.0.2 and a Samsung Galaxy S3 running Android 4.3 Thanks for all the help! |
Hi, I realized that the accessToken was missing from the Manifest file -- that solved the issue mentioned above. I guess this issue is resolved. The best solution would be the lib packing a 64bits .so but since this is not planned for the near future I'll have to decided what to do about the Card.IO lib. Thank you for all the help! |
So, I found out that gradle supports targeting platforms. I found it in this SO question. Using that I forced my project to not attach the 64 bits .so. I guess this is a good solution while Mapbox doesn't support 64 bits. |
I am getting the exact same libmapbox-gl.so error as soon as I add |
Thanks for all the insight into This doesn't mean that we are against shipping a 64 bit |
Discussed this issue with @kkaefer this morning and he's going to look into it. The big stumbling block has traditionally been getting it to compile properly and not knowing / understanding the intricacies of C++ when it errors out to understand the overall scope. The same C++ code base does already run on |
Things are already looking promising thanks to 5 minutes of @kkaefer's time. Turns out that the project's Mason build file has a bit different naming conventions for ABI that Android and he was able to get the ARM 64 bit version to compile and produce a He ran:
I'll test this on a 64 bit Android device as @kkaefer doesn't have access to one. Assuming that it works as expected, I'll add this ABI to the build list. For clarity and posterity, here's the Mason mapping to ABI
|
I did an initial test of things running on a Nexus 5x, which has a Steps
02-25 10:43:02.596 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: java.io.FileNotFoundException: /jacoco.exec: open failed: EROFS (Read-only file system)
02-25 10:43:02.596 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.IoBridge.open(IoBridge.java:452)
02-25 10:43:02.596 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at java.io.FileOutputStream.<init>(FileOutputStream.java:87)
02-25 10:43:02.596 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.output.FileOutput.openFile(FileOutput.java:67)
02-25 10:43:02.596 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.output.FileOutput.startup(FileOutput.java:49)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Agent.startup(Agent.java:122)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Agent.getInstance(Agent.java:50)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at org.jacoco.agent.rt.internal_773e439.Offline.<clinit>(Offline.java:31)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at com.mapbox.mapboxsdk.testapp.MapboxApplication.$jacocoInit(MapboxApplication.java)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at com.mapbox.mapboxsdk.testapp.MapboxApplication.<init>(MapboxApplication.java)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at java.lang.Class.newInstance(Native Method)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.Instrumentation.newApplication(Instrumentation.java:996)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.Instrumentation.newApplication(Instrumentation.java:981)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.LoadedApk.makeApplication(LoadedApk.java:573)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4680)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.-wrap1(ActivityThread.java)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.os.Looper.loop(Looper.java:148)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at java.lang.reflect.Method.invoke(Native Method)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-25 10:43:02.597 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system)
02-25 10:43:02.598 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.Posix.open(Native Method)
02-25 10:43:02.598 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
02-25 10:43:02.598 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: at libcore.io.IoBridge.open(IoBridge.java:438)
02-25 10:43:02.598 10221-10221/com.mapbox.mapboxsdk.testapp W/System.err: ... 21 more
02-25 10:43:02.609 10221-10236/com.mapbox.mapboxsdk.testapp D/LeakCanary: Could not attempt cleanup, leak storage not writable.
02-25 10:43:02.666 10221-10221/com.mapbox.mapboxsdk.testapp W/LocationServices: Location Permissions Not Granted Yet. Try again after requesting.
02-25 10:43:02.690 10221-10238/com.mapbox.mapboxsdk.testapp A/libc: Fatal signal 4 (SIGILL), code 1, fault addr 0x7f8b36c650 in tid 10238 (pboxsdk.testapp)
02-25 10:43:02.741 484-484/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-25 10:43:02.742 484-484/? A/DEBUG: Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29Q/2480792:user/release-keys'
02-25 10:43:02.742 484-484/? A/DEBUG: Revision: 'rev_1.0'
02-25 10:43:02.742 484-484/? A/DEBUG: ABI: 'arm64'
02-25 10:43:02.742 484-484/? A/DEBUG: pid: 10221, tid: 10238, name: pboxsdk.testapp >>> com.mapbox.mapboxsdk.testapp <<<
02-25 10:43:02.742 484-484/? A/DEBUG: signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x7f8b36c650
02-25 10:43:02.751 484-484/? A/DEBUG: x0 0000007f9e489130 x1 0000007f999a6310 x2 0000000000000003 x3 0000000000000002
02-25 10:43:02.751 484-484/? A/DEBUG: x4 0000007fa2ee3000 x5 00000000ffffffff x6 0000000000000001 x7 0000007f9e4894f0
02-25 10:43:02.752 484-484/? A/DEBUG: x8 0000007f8b36c650 x9 0000007f9e4894f0 x10 0000000000000001 x11 0000007f95125900
02-25 10:43:02.752 484-484/? A/DEBUG: x12 0000007fa2ea3b40 x13 0000000000000001 x14 0000000000000002 x15 0000000000000008
02-25 10:43:02.752 484-484/? A/DEBUG: x16 0000000000000009 x17 0000007fa2ea3000 x18 0000007f95125900 x19 0000007f999a6300
02-25 10:43:02.753 484-484/? A/DEBUG: x20 0000007f999a6310 x21 0000007f9e489130 x22 0000007f9e702140 x23 0000007f9e489310
02-25 10:43:02.753 484-484/? A/DEBUG: x24 92742faffdb3cfce x25 0000007f9e489130 x26 0000007ff0d0cd88 x27 0000007ff0d0cce8
02-25 10:43:02.753 484-484/? A/DEBUG: x28 0000000000001000 x29 0000007f9e4890f0 x30 0000007f8b16b4d0
02-25 10:43:02.753 484-484/? A/DEBUG: sp 0000007f9e4890d0 pc 0000007f8b36c650 pstate 0000000060000000
02-25 10:43:02.760 484-484/? A/DEBUG: #00 pc 00000000003fd650 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so
02-25 10:43:02.760 484-484/? A/DEBUG: #01 pc 00000000001fc4cc /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (mbgl::util::AsyncTask::Impl::Impl(std::__1::function<void ()>&&)+96)
02-25 10:43:02.760 484-484/? A/DEBUG: #02 pc 00000000001fc308 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (mbgl::util::AsyncTask::AsyncTask(std::__1::function<void ()>&&)+40)
02-25 10:43:02.760 484-484/? A/DEBUG: #03 pc 00000000001fc888 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (mbgl::util::RunLoop::RunLoop(mbgl::util::RunLoop::Type)+680)
02-25 10:43:02.761 484-484/? A/DEBUG: #04 pc 000000000020a4c8 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&>, 0ul, 1ul>(mbgl::util::ThreadContext, std::__1::tuple<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)+68)
02-25 10:43:02.761 484-484/? A/DEBUG: #05 pc 000000000020a420 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long&&&)::'lambda'()::operator()() const+252)
02-25 10:43:02.761 484-484/? A/DEBUG: #06 pc 000000000020a2cc /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so (std::__1::__thread_proxy<std::__1::tuple<mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::Thread<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long&>(mbgl::util::ThreadContext const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&&, unsigned long&&&)::'lambda'()> >(void*, void*)+100)
02-25 10:43:02.761 484-484/? A/DEBUG: #07 pc 0000000000066d24 /system/lib64/libc.so (__pthread_start(void*)+52)
02-25 10:43:02.761 484-484/? A/DEBUG: #08 pc 000000000001eb84 /system/lib64/libc.so (__start_thread+16)
02-25 10:43:02.919 877-10239/? W/ActivityManager: Force finishing activity com.mapbox.mapboxsdk.testapp/.MainActivity
02-25 10:43:02.919 484-484/? E/DEBUG: AM write failed: Broken pipe |
/cc @jfirebaugh |
We were getting segmentation faults and illegal instructions. My take is support for aarch64 + C++14 symbols is fresh. I didn't find anyone else reporting similar issues so I created one on AOP. AOP issue: https://code.google.com/p/android/issues/detail?id=204151 Mapbox GL Native issues: mapbox/mapbox-gl-native#1956 mapbox/mapbox-gl-native#3128
We were getting segmentation faults and illegal instructions. My take is support for aarch64 + C++14 symbols is fresh. I didn't find anyone else reporting similar issues so I created one on AOP. AOP issue: https://code.google.com/p/android/issues/detail?id=204151 Mapbox GL Native issues: mapbox/mapbox-gl-native#1956 mapbox/mapbox-gl-native#3128
Mason updates to |
Uni-branch update for Mason that impacts this is documented here --> mapbox/mason#133 |
The development branch is |
I just successfully tested the
This confirms to me that the The next thing to do is confirm that the other supported ABI continue to work by running it through AWS Device Farm. _arm-64 ABI in local SDK_ _arm-64 ABI in local TestApp_ |
I re ran last night's arm64 test this morning for the The remaining thing to do is to verify that the remaining ABIs (x86, x86-64, mips) work as expected also. To do this @tobrun has produced sample TestApp The only remaining thing to do once we get sign off is to add |
The results are in, we are now supporting the same amount as before thus the introduction of the 64 bit was succesfull! |
It looks like @tmpsantos merged this into |
As usual @tmpsantos is one step of ahead of me and has added the arm64 inclusion in PR #4366. So the new plan is to merge that PR into |
I just cherry picked the two commits as discussed with @tmpsantos from Big thanks to @tmpsantos for solving this problem! 💥 _arm64 Fix Commits Cherry Picked Onto Release Branch_ |
Awesome! Congratulations! |
I'm trying to use MapBox's version 2. in my project but when I try to show the Map an UnsatisfiedLinkError is thrown.
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.whittl.whittl.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/com.whittl.whittl.debug-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libmapbox-gl.so"
I saw an open issue that was discussing something related to that -- in the discussion it seemed that Android should fallback to the 32bit lib if no 64bit was found, but clearly this is not happening in my case.
Both my project and the MapboxGLAndroidSDKTestApp included in this repository throw the same error, but https://github.com/mapbox/mapbox-android-demo runs.
I'm using the same gradle url for fetching MapBox as mapbox-android-demo.
I hope you guys can lend me a hand.
Thanks!
The text was updated successfully, but these errors were encountered: