Today we got a strange crash. During the first installation the app downloads and unzips openh264 to the internal directory of the app, happens on a Schedulers.io() thread from rxAndroid.
This is the first crash of this kind (>5k installations) and I found this link (very interesting blog by the way) with a matching error message. I'm not sure if really someone tried to replace the openH264 lib or if someone tried to install the apk file on a x86 device. I'm still using 1.4 of openH264 and have read the 1.5 release notes. There is no hint of security fixes.
Some more details about the device:
Android: 4.3
Manufacturer: Samsung
Model: GT-I9300
And finally, here is the crash log:
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/path/files/libopenh264.so" has bad ELF magic
at java.lang.Runtime.load(Runtime.java:330)
at java.lang.System.load(System.java:511)
at path.BeatMarker.init(BeatMarker.java:33)
at path.fragments.main.MainFragment.onOpenH264Done(MainFragment.java:475)
at path.fragments.main.MainPresenterImpl.onOpenH264Done(MainPresenterImpl.java:25)
at path.fragments.main.MainLoaderImpl$1.onCompleted(MainLoaderImpl.java:61)
at rx.observers.SafeSubscriber.onCompleted(SafeSubscriber.java:81)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.pollQueue(OperatorObserveOn.java:201)
at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber$2.call(OperatorObserveOn.java:170)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
... 9 more
I'm pretty sure, the crash happens here:
at path.BeatMarker.init(BeatMarker.java:33)
These are the lines:
File libOpenH264File = new File(context.getFilesDir(), "libopenh264.so");
System.load(libOpenH264File.getAbsolutePath()); //line 33
Gets called, when the download and unzip is completed.
Can the error occur, while the lib is downloading and the network connection get lost?
Any help or hint is welcome, thanks in advance! :)
Related
I tested the renderscript on my devices (Nexus 4/5/S, Samsung I747). But when I release the beta to people, I collected crashes from various devices, and they're all ARM chip.
Please see the affected devices:
http://crashes.to/s/b7578ea44e5
This is the error:
android.support.v8.renderscript.o: Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load RSSupport: findLibrary returned null
at android.support.v8.renderscript.RenderScript.shouldThunk()
at android.support.v8.renderscript.RenderScript.shouldThunk()
at com.xyang.android.timeshutter.model.imageprocessing.BaseTwoPassFilterEdgeDetector.()
at com.xyang.android.timeshutter.model.imageprocessing.SobelEdgeDetector.()
at com.xyang.android.timeshutter.model.BaseBitmapPersistentHelper.getBitmap()
at com.xyang.android.timeshutter.model.BitmapPersistentHelper.cropAndSave()
at com.xyang.android.timeshutter.model.BitmapPersistentHelper.readCompressedImageDataFromUri()
at com.xyang.android.timeshutter.app.capture.FreeCropFragment.onClick()
at android.view.View.performClick(View.java:4100)
at android.view.View$PerformClick.run(View.java:17021)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4788)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:541)
at dalvik.system.NativeStart.main(NativeStart.java)
I know there're some bug for the Intel x86 devices, but why ARM devices also get this link error?
It looks like you didn't include the JNI libraries as part of your application package. Please check that you didn't accidentally strip them. You should have libRSSupport.so, librsjni.so, as well as a librs..so for each user script you have in your application. These should exist under the lib/armeabi-v7a directory for any ARM device. There should also be similar subdirectories for x86/mips.
Some users have reported this error via the android error reporting popup thing but I have no idea what causes it. I googled but I can't find any good leads.
Anyone know what causes this error?
java.lang.RuntimeException: Unable to create BackupAgent
com.berlin.mobson.view.OsmandBackupAgent:
java.lang.NullPointerException at
android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2331)
at android.app.ActivityThread.access$2400(ActivityThread.java:134) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1358)
at android.os.Handler.dispatchMessage(Handler.java:99) at
android.os.Looper.loop(Looper.java:137) at
android.app.ActivityThread.main(ActivityThread.java:4856) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:511) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at
dalvik.system.NativeStart.main(Native Method) Caused by:
java.lang.NullPointerException at
android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:377)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:320) at
android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2301)
... 10 more
My App is a Place finder that uses google Places api to get search results. (no the library, just the json urls)
osmand is
Mobile Map Viewing & Navigation for Offline and Online OSM Maps.
The source code is available here Osmand
May be you can remove osmand from the device and then debug the application using above code available.
Thanks
Looks like their BackupAgent implementation is having some problems. A temporary solution is unchecking "Back up my data" in settings->backup & reset. Long term the NPE has to be tracked down in the BackupAgent.
I published an Android application that uses ACRA for crash reporting. Now I got a strange crash report:
java.lang.NullPointerException
at android.webkit.WebViewClassic.setBaseLayer(WebViewClassic.java:5377)
at android.webkit.WebViewClassic.setNewPicture(WebViewClassic.java:10781)
at android.webkit.WebViewClassic$PrivateHandler.handleMessage(WebViewClassic.java:10012)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4898)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1006)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)
at dalvik.system.NativeStart.main(Native Method)
The report was sent from a Samsung Galaxy S3 (GT-I9300) running Android 4.1.1. The report is strange (from my point of view) because my app doesn't use a WebView (no display of web pages in the whole app, no HTML handling at all). Furthermore the stack trace doesn't include any of my packages. Certainly I cannot reproduce the crash.
Has anybody else encountered this (or a very similar) stack trace? Why is this exception thrown? And what can I do to avoid the exception? Any help is really appreciated.
This can be caused due to use of external ad networks that may use WebViews. This is a problem that needs to be addressed by the ad network maintainers. Apart from bringing it their attention, there is really nothing you can do about this short of removing the offending providers' ads from your application.
We recently introduced OAuth login in our app. This means using a WebView to authenticate the user, and an AsyncTask to do necessary REST calls afterwards.
Unfortunately, after introducing this login method, we're getting reports of the app force closing. This seems to be related to other AsyncTasks that are executed after the login, but the stack traces does unfortunately not tell us much:
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3100)
at android.view.View.performClick(View.java:3627)
at android.view.View$PerformClick.run(View.java:14329)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4511)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3095)
... 11 more
Caused by: java.lang.NoClassDefFoundError: android/os/AsyncTask
at com.foo.bar.TransmissionActivity.transmit(TransmissionActivity.java:44)
... 14 more
We managed to fix the error above by using RoboAsyncTask (from RoboGuice), instead of AsyncTask from the Android SDK, but we have other activities that use WebViews. WebView apparently uses AsyncTask somewhere in its call stack, and errors similar the one shown above (Caused by: java.lang.NoClassDefFoundError: android/os/AsyncTask) have started to show in our error logs.
The error happens on different devices, and different Android versions, with no apparent pattern. We have tried to reproduce the error ourselves, without any luck.
Any ideas?
It might be an issue with the build setup. (Build order of src/gen has been known to cause some issues, the libs folder for the compat library being called lib has caused some issues for me on new sdk versions).
To see if it is create a new project (in eclipse, since that's 100% android official). Add a webview and an asynctask and then do a diff on the project with your project. Ignoring src/gen/res. Hopefully you'll find that the src/gen are built in the wrong order or something like that.
~ Anders
Ok so i've installed everything that should be needed in order for APV and/or MuPDF to work, but it still crashes.
I'm not very good at using shells to install programs and all that, but i did follow the instructions included in the readme files as good as i was able to.
When i try to run the program now (APV) It works fine until i try to open a pdf file, where i get the errors:
FATAL EXCEPTION: main
java.lang.ExceptionInInitializerError
cx.hell.android.pdfview.OpenFileActivity.getPDF(OpenFileActivity.java:442)
cx.hell.android.pdfview.OpenFileActivity.startPDF(OpenFileActivity.java:403)
cx.hell.android.pdfview.OpenFileActivity.onCreate(OpenFileActivity.java:169)
android.app.Activity.performCreate(Activity.java:4465)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
android.app.ActivityThread.access$600(ActivityThread.java:123)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
android.os.Handler.dispatchMessage(Handler.java:99)
android.app.ActivityThread.main(ActivityThread.java:4424)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:511)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load pdfview2: findLibrary returned null
java.lang.Runtime.loadLibrary(Runtime.java:365)
java.lang.System.loadLibrary(System.java:535) at cx.hell.android.pdfview.PDF.<clinit>(PDF.java:15)
I've installed everything in D:\Android , where i have the following subfolders:
apache-ant-1.8.3
android-ndk-r7c
android-sdk
Cygwin
apv (containing : pdfview\jni\ libraries like freetype, mupdf, jpeg, openjpg etc. also another version of android-ndk-r7c)
i've tried running all the build files included in the scrip documents like: build-native, scale-images, ndk-build![enter image description here][2]
This is a screen dump from build-native just before it finishes.
succesfull stuff happening
cp: cannot create regular file '../jni/freetype/include/freetype/config/ftoption.h': Permission denied
cp: cannot create regular file '../jni/freetype/include/freetype/config/sed008052': Permission denied
cp: cannot create regular file '../jni/freetype/include/freetype/config/sed007576': Permission denied
D:\Android\apv\pdfview\scripts\build-native.sh: line 31: gcc: command not found
D:\Android\apv\pdfview\scripts\build-native.sh: line 34: ../../scripts/fontdumpt: No such file or directory
I honestly have no idea how else to attack this and the tutorial at : http://mupdf.com/repos/mupdf/android/ReadMe.txt didn't do much for me. If anyone else have any experience using this then i'd really appreciate any help you could offer.
The application i'm making will be open source so by helping me you can get a good laugh at my code later on! :)
also, sorry for the shitty text but can't post images until i have 10 reputation
Thanks, Anders