Closed drunkenplatypus closed 6 years ago
What are the abi filters from your gradle script?
From the sample gradle scripts:
ndk {
/*
* Sceneform is available for the following ABIs: arm64-v8a, armv7a,
* x86_64 and x86. This sample app enables arm64-v8a to run on
* devices and x86 to run on the emulator. Your application should
* list the ABIs most appropriate to minimize APK size (arm64-v8a recommended).
*/
abiFilters 'arm64-v8a', 'x86'
}
I get the error using the solarsystem demo app, completely unmodified. So yes, they are the abiFilters I'm using.
EDIT: I should add that I am on Ubuntu 16.04.
@drunkenplatypus That's very strange. To help investigate, I think it would be helpful to get more information on your emulator.
Can you launch the emulator, reproduce the issue, then save a bug report in Extended controls ("..." on the Toolbar) > Bug Report panel, and then send the data my way?
@jwmcglynn I believe I am seeing this same issue, for me it occurs when 'hellosceneform' or the 'solarsystem' apps start on my AVD. Please note I have tried several times to generate a bug report but it keeps failing.
My setup: Android Studio 3.1.4 Build #AI-173.4907809, built on July 23, 2018 JRE: 1.8.0_152-release-1024-b02 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0 Emulator: 27.3.9
AVD: Name: Pixel_XL_API_27 CPU/ABI: Google APIs Intel Atom (x86) Target: google_apis [Google APIs] (API level P) Skin: 1440x2560
Stack Trace example: 8-12 02:38:20.022 5580-5580/com.google.ar.sceneform.samples.hellosceneform E/ArSceneView: Error loading libarsceneview_jni.so java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.google.ar.sceneform.samples.hellosceneform-utWO-3I3wyY8wQChVlL1fA==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.ar.sceneform.samples.hellosceneform-utWO-3I3wyY8wQChVlL1fA==/lib/x86, /data/app/com.google.ar.sceneform.samples.hellosceneform-utWO-3I3wyY8wQChVlL1fA==/base.apk!/lib/x86, /system/lib]]] couldn't find "libarsceneview_jni.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1012) at java.lang.System.loadLibrary(System.java:1657) at com.google.ar.sceneform.ArSceneView.reportEngineType(Unknown Source:2) at com.google.ar.sceneform.ArSceneView.resume(Unknown Source:4) at com.google.ar.sceneform.ux.BaseArFragment.start(BaseArFragment.java:453) at com.google.ar.sceneform.ux.BaseArFragment.onResume(BaseArFragment.java:299) at android.support.v4.app.Fragment.performResume(Fragment.java:2390) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1474) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1759) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1827) at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3244) at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:3212) at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:217) at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:509) at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:498) at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:171) at android.app.Activity.performResume(Activity.java:7293) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3727) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3787) at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:146) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:75) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
@drunkenplatypus - Thanks for the issue report. As you noticed, it is a problem loading a library in the emulator (or x86 devices), and other than creating an exception in the log file, it does not affect the performance or functionality of Sceneform. It's on the list to fix in a future release.
Same stacktrace might be caused by different problem:
2019-09-27 15:05:41.024 libc: Fatal signal 6 (SIGABRT), code -6 in tid 28022
2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: Build fingerprint: 'samsung/a3y17ltexc/a3y17lte:8.0.0/R16NW/A320FLXXS4CSG5:user/release-keys' 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: Revision: '4' 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: ABI: 'arm' 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: pid: 28022, tid: 28022, name: ... 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: r0 00000000 r1 00006d76 r2 00000006 r3 00000008 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: r4 00006d76 r5 00006d76 r6 ffb5fda0 r7 0000010c 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: r8 00000056 r9 c16da98d sl 00000000 fp ffb5ff6c 2019-09-27 15:05:41.294 28879-28879/? A/DEBUG: ip 00000000 sp ffb5fd90 lr ecf354c7 pc ecf66748 cpsr 200e0010 2019-09-27 15:05:41.297 28879-28879/? A/DEBUG: backtrace: 2019-09-27 15:05:41.297 28879-28879/? A/DEBUG: #00 pc 0004b748 /system/lib/libc.so (tgkill+12) 2019-09-27 15:05:41.297 28879-28879/? A/DEBUG: #01 pc 0001a4c3 /system/lib/libc.so (abort+54) 2019-09-27 15:05:41.297 28879-28879/? A/DEBUG: #02 pc 000571f1 /data/app/com.<...>.debug-HdcYqzh22fveHQHBcYioVw==/lib/arm/libfilament-jni.so
The UnsatisfiedLinkError
exception happens if I:
1) open initially AR fragment
2) replace it with another fragment
3) and then return back to AR fragment
supportFragmentManager.beginTransaction().replace(R.id.treasure_hunt_fragment, arFragment).commit()
// after button click
supportFragmentManager.beginTransaction().replace(R.id.treasure_hunt_fragment, supportMapFragment).commit()
// after another button click
supportFragmentManager.beginTransaction().replace(R.id.treasure_hunt_fragment, arFragment).commit()
Also facing the same issue.
@soshial buddy have you found any workaround for this?
@soshial i occured the same question, did u find any resolved methods?
what u have found so far is that error we are recieving is Error loading libarsceneview_jni.so but if we analyze apk the file " libarsceneview_jni " is not there because its renamed to libarsceneview-jni.so so i dont know how can we fix on our side but it seems like the cause of this error
@claywilkinson could you please look into it either i am wrong or right..
@tpsiaki Could you comment on libarsceneview_jni name change above?
@adeelturk libarsceneview may be optional, can you try adding a try/catch around the onResume call? BaseArFragment is open-source in the sceneformux package: https://github.com/google-ar/sceneform-android-sdk/blob/master/sceneformux/ux/src/main/java/com/google/ar/sceneform/ux/BaseArFragment.java
ok i will but when i downgraded my library veriosn to 1.11 same source code is working so i dont think its optional at least not in my case
i want to draw a 3d object on marker , all i found is that its working propely in 1.9 only but that version is missing with a method to setFocusMode and i want this method because if i try to read marker on a paper without focus it doesnt work so i am kinda stuck here
@adeelturk the callstack listed above showing a problem loading libsceneview_jni is due to a problem we have in Sceneform with being overly chatty in our logs when we hit a certain failure case, but it's not fatal. If you're seeing a crash in your app, there should be a different fatal callstack that will show up in adb logcat.
For example, the above report from @soshial also listed this callstack, but the fatal callstack was related to having a mismatch in the version of the sceneform plugin library and the sceneform ux library (which results in a Filament material version mismatch, and in the case of the 1.11 to 1.12 versions, a fatal crash).
@tpsiaki I have version 1.12.0 set in both places:
ext.sceneform_version = "1.12.0"
implementation "com.google.ar.sceneform.ux:sceneform-ux:$sceneform_version"
classpath "com.google.ar.sceneform:plugin:$sceneform_version"
I have this log just before UnsatisfiedLinkError
exception:
Then goes UnsatisfiedLinkError
exception:
The device is Samsung Galaxy A3 (2017).
@soshial if you search for "FATAL" in your log are there any errors/callstacks after the UnsatisfiedLinkError libarsceneview_jni log? I would expect the fatal issue to be after (perhaps long after in the logs) that UnsatisfiedLinkError.
No FATAL keyword on both Samsung Galaxy A3 and Google Pixel 3. The latter had this log:
Looks like on both devices Camera app messages about some problems.
Here are my libs:
@soshial change 1.12.0 to 1.11.0. works for me. As you can see in 1.12.0 there is no significant fix or new feature provided.
I'm using the solarsystem example app on the Android Emulator (v27.3.4, Pixel 2 API 27, Android 8.1).
When the program calls arSceneView.resume() I am getting an UnsatisfiedLinkError when it is trying to execute
System.loadLibrary("arsceneview_jni")
.I analysed the APK and could see that libarsceneview_jni.so was included in the arm64-v8a lib directory, but it was not included in the x86 lib directory.
In this example app it seems to just ignore the fact it can't find it and continue. However on an app that I have made, this is the last error I can see before the app crashes.
My setup:
Logcat of error