RenderScript No JNI_OnLoad found error - android

I am using renderscript library in my project and I perfectly run my apk on Samsung S4 I9500. But when I tried this in other phones I get crash.
No JNI_OnLoad found in /system/lib/libRSSupport.so 0x4185f0f0, skipping init
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/dalvikvm﹕ ERROR: couldn't find native method
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/dalvikvm﹕ Requested: Landroid/support/v8/renderscript/RenderScript;._nInit:()V
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti E/JNIHelp﹕ RegisterNatives failed for 'android/support/v8/renderscript/RenderScript', aborting
02-23 19:42:40.370 8994-8994/com.example.gameboy.gununtesti A/libc﹕ Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 8994
Any help appreciated. Thanks.

You forgot to include libRSSupport.so + the other native libraries in your .apk. This is attempting to load the system version of the compatibility, library, which will not work with your app.

Related

Current AndroidStudio sample fails on phone due to runtime native library link error. Why?

Its on an HTC Aria, running 2.2 (API 8)
https://en.wikipedia.org/wiki/HTC_Aria
The aria is an armv6 device that supports opengles 2
If you open up the latest Android Studio (im working on windows 7), then import the HelloGL2 sample, then simply try to run it on the above device, it will fail as soon as it tries to make a call into the native library.
Here is the log:
01-06 11:14:08.467 12771-12813/com.android.gl2jni D/dalvikvm: Trying to load lib /data/data/com.android.gl2jni/lib/libgl2jni.so 0x44c165d0
01-06 11:14:08.467 12771-12813/com.android.gl2jni I/dalvikvm: Unable to dlopen(/data/data/com.android.gl2jni/lib/libgl2jni.so): Cannot load library: link_image[1995]: failed to link libgl2jni.so
01-06 11:14:08.477 12771-12813/com.android.gl2jni W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/android/gl2jni/GL2JNILib;.<clinit>
01-06 11:14:08.497 12771-12813/com.android.gl2jni W/dalvikvm: threadid=8: thread exiting with uncaught exception (group=0x40028a00)
01-06 11:14:08.517 95-121/? I/ActivityManager: Displayed activity com.android.gl2jni/.GL2JNIActivity: 9823 ms (total 2027818 ms)
01-06 11:14:08.567 12771-12813/com.android.gl2jni E/AndroidRuntime: FATAL EXCEPTION: GLThread 9
java.lang.ExceptionInInitializerError
at com.android.gl2jni.GL2JNIView$Renderer.onSurfaceChanged(GL2JNIView.java:332)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1327)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)
Caused by: java.lang.UnsatisfiedLinkError: Library gl2jni not found
at java.lang.Runtime.loadLibrary(Runtime.java:461)
at java.lang.System.loadLibrary(System.java:557)
at com.android.gl2jni.GL2JNILib.<clinit>(GL2JNILib.java:24)
at com.android.gl2jni.GL2JNIView$Renderer.onSurfaceChanged(GL2JNIView.java:332) 
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1327) 
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118) 
01-06 11:14:08.607 95-164/? W/ActivityManager: Force finishing activity com.android.gl2jni/.GL2JNIActivity
This sample works on the 3 other devices i've tried (Galaxy s5, Galaxy J1, Nexus s)
The line: 'Unable to dlopen(/data/data/com.android.gl2jni/lib/libgl2jni.so): Cannot load library: link_image[1995]: failed to link libgl2jni.so' is probably key. I tried loading the library explicitly using system.loadlibrary, but the same problem happens on that call.
I think it might be something to do with the processor being armv6?
The sample is configured to do 'armeabi' though.

Libgdx Android Game Fatal signal 11 (SIGSEGV)

I have developed a game using Libgdx. It stops randomly by giving Fatal signal 11(SIGSEGV) error. Sometimes it force closes and sometimes force closes and then automatically restarts. The logs printed during force close are:-
A/libc(3475): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 3534 (Thread-343)
I also keep on getting some logs during my game play from time to time.
04-27 09:04:18.750: D/dalvikvm(3475): Issue registerizing the trace in the backend.
04-27 09:04:18.750: I/dalvikvm(3475): Ignoring other issues and retrying without backend registerization
04-27 09:04:18.750: D/dalvikvm(3475): JIT_INFO: Retrying trace Lcom/badlogic/gdx/graphics/g2d/BitmapFontCache;translate, offset 40
04-27 09:12:39.410: D/dalvikvm(3475): JIT_INFO: Issues while compiling trace Ljava/util/Arrays;fill, offset 7
04-27 09:12:39.410: D/dalvikvm(3475): The trace provoked a spill.
04-27 09:12:39.410: I/dalvikvm(3475): Trying less registerization from 1 to 0
04-27 09:12:39.410: D/dalvikvm(3475): JIT_INFO: Retrying trace Ljava/util/Arrays;fill, offset 7
04-27 09:14:08.930: I/dalvikvm(3475): JIT_INFO: Overwriting association of v6:ecx with xmm0
04-27 09:18:30.610: D/dalvikvm(3475): JIT_INFO: Issues while compiling trace Ljava/util/Arrays;fill, offset 5
04-27 09:18:30.610: D/dalvikvm(3475): The trace provoked a spill.
04-27 09:18:30.610: I/dalvikvm(3475): Trying less registerization from 1 to 0
Please help me I am stuck and not able to find the cause of issue.

Vitamio crashes on Android 6.0

We are using Vitamio in our project as a MediaPlayer. When we change target SDK to API level 23 it crashes.
Logcat is as follows:
10-10 22:12:04.858: E/Vitamio[4.2.1]Player: LOAD FFMPEG ERROR: dlopen failed: /data/data/com.project/libs/libffmpeg.so: has text relocations
10-10 22:12:04.864: E/Vitamio[4.2.1]Player: FIND_NAME_SYM vvo, render_yuv
10-10 22:12:04.869: A/libc(9372): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 9372
There is an issue about this problem in Vitamio's github page : https://github.com/yixia/VitamioBundle/issues/312
Is there any workaround for this problem?

Android app random crash in Samsung S4 device when Backpressed or Finish the activity?

android application random crash in Galaxy S4 and Nexus 5. On other device is working file.
The crash happen mostly when I back pressed or finish the activity.
And I got the error in log
E/ViewRootImpl( 7168): sendUserActionEvent() mView == null
W/ApplicationPackageManager( 7168): getCSCPackageItemText()
W/Resources( 7168): Converting to int: TypedValue{t=0x3/d=0xcd6 "60" a=3 r=0x7f090170}
W/Resources( 7168): Converting to int: TypedValue{t=0x3/d=0xcd5 "500" a=3 r=0x7f09016f}
W/Resources( 7168): Converting to int: TypedValue{t=0x3/d=0xcd7 "30" a=3 r=0x7f090171}
F/libc ( 7168): invalid address or address of corrupt block 0x73880968 passed to dlfree
D/dalvikvm( 7168): [SWE] ### S.LSI JIT optimization list BEGIN ###
D/dalvikvm( 7168): [SWE] ### S.LSI JIT optimization list END ###
F/libc ( 7168): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 7183 (AsyncTask #1)
D/dalvikvm( 7770): Late-enabling CheckJNI
I/dalvikvm( 7770): Enabling JNI app bug workarounds for target SDK version 9...
can any one help me on this issue , how to resolve or any workaround ...

libs suddenly won't load in dynamic linker (NDK)

I've been developing an NDK app for quite some time and it's been working well. However, today the app randomly decided to not start anymore, after I compiled it after making some nominal change. It's caused by a cryptic problem with loading the app's main library. Here's some log output:
08-11 18:38:11.220 D/dalvikvm( 1237): Added shared lib /mnt/asec/com.audia.rta-1/lib/libqtandroid.so 0x40513bd8
08-11 18:38:11.220 D/dalvikvm( 1237): No JNI_OnLoad found in /mnt/asec/com.audia.rta-1/lib/libqtandroid.so 0x40513bd8, skipping init
08-11 18:38:11.220 D/dalvikvm( 1237): Trying to load lib /mnt/asec/com.audia.rta-1/lib/librta.so 0x40513bd8
08-11 18:38:11.260 D/AndroidRuntime( 1237): Shutting down VM
08-11 18:38:11.260 W/dalvikvm( 1237): threadid=1: thread exiting with uncaught exception (group=0x40015560)
08-11 18:38:11.260 E/AndroidRuntime( 1237): FATAL EXCEPTION: main
08-11 18:38:11.260 E/AndroidRuntime( 1237): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 67 cannot locate '_ZNSaIcEC1Ev'...
08-11 18:38:11.260 E/AndroidRuntime( 1237):
08-11 18:38:11.260 E/AndroidRuntime( 1237): at java.lang.Runtime.loadLibrary(Runtime.java:434)
08-11 18:38:11.260 E/AndroidRuntime( 1237): at java.lang.System.loadLibrary(System.java:554)
08-11 18:38:11.260 E/AndroidRuntime( 1237): at com.audia.rta.RTA.onCreate(RTA.java:139)
According to some Google results, _ZNSaIcEC1Ev is part of libstdc++. I've checked, and it gets linked in the build process, and g++ is being used for linking.
Oddly enough, reverting to an older apk of the app fixes the problem, but compiling an old revision and installing that doesn't fix the problem. Everything in my build system is checked into version control, and I've done several clean builds. All my builds were working today and then they just stopped working. I didn't upgrade or install anything; it happened while I was in the middle of testing new code. What happened?
Update: Building from a freshly checked out copy doesn't fix the problem.
Update 2: Is there any way I can track down the link to that symbol, maybe with objdump? Maybe this could provide some clues.
I ended up compiling everything with a fresh NDK install, and it worked. It's as if the old one was corrupted somehow, though I have no idea how.
It was also an upgrade from r5b to r6, so maybe it's related to the NDK version.

Categories

Resources