Android TaskView produces ClassCastException - android

My grandfather is proud owner of a Samsung Galaxy Ace 2. He now told me that whenever he presses the home-button long to open the task view he gets an error "Unfortunately, System UI has stopped"
I know investigated on this and tried to reproduce the error while being connected to the android monitor to get a more specific error message.
The error message looks like the following:
01-22 12:44:42.450 4978-4978/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.ClassCastException: android.graphics.drawable.StateListDrawable cannot be cast to android.graphics.drawable.BitmapDrawable
at com.android.systemui.recent.RecentsPanelView.replaceGoogleButtonTo3rdAppTextAndIcon(RecentsPanelView.java:1444)
at com.android.systemui.recent.RecentsPanelView.replaceGoogleButtonTextAndIcon(RecentsPanelView.java:1392)
at com.android.systemui.recent.RecentsPanelView.show(RecentsPanelView.java:461)
at com.android.systemui.recent.RecentsPanelView.showIfReady(RecentsPanelView.java:391)
at com.android.systemui.recent.RecentsPanelView.onTasksLoaded(RecentsPanelView.java:1015)
at com.android.systemui.recent.RecentTasksLoader$1.onProgressUpdate(RecentTasksLoader.java:292)
at com.android.systemui.recent.RecentTasksLoader$1.onProgressUpdate(RecentTasksLoader.java:285)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:647)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4867)
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)
01-22 12:44:42.460 1988-2005/? E/android.os.Debug: !#Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error
There is no custom rom installed or any other custom application. The latest updates already are installed. After searching the web, I did a wipe of the cache in the recovery menu also I made a full reset of the mobile phone. Nothin helped by now.
Maybe some of you may have an idea on what to investigate any further?

Related

How to debug an apk installed through google drive?

My Android App works fine in Emulator and on physical devices connected to the computer, but it (app) crashes when APK installed through Google Drive on the same device.
My app has two activities: Main and Game Play. On the main screen (activity) there is a Play button that starts the second activity (game play). I have a physical device (Galaxy Tab E) connected to my computer. When I test my app on the emulator and on the physical device, the app works fine without any problems. However, when I generate an APK for Google Play Store and uploading it on my Google Drive, and installing it on the same physical device, it crashes when I click/tap the Play button. Don't know how to debug it and I don't know what am I missing. Is there any difference between Android Studio package that tests on the emulator and the generated apk?
I don't know how to get any generated error to add here for troubleshooting, as the device is not connected to the computer.
I expect the APK to work exactly as on the emulator or USB-connected device. Any help is greatly appreciated.
Edit:
After connecting the cable, I got the following errors when pressing the Play button:
08-15 12:15:23.762 14689-14689/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: ca.simapp.kids, PID: 14689
java.lang.VerifyError: c/b/b/a/e/a/VJ
at c.b.b.a.e.a._J.f()
at c.b.b.a.e.a._m.a()
at c.b.b.a.e.a.oD.a(:16)
at c.b.b.a.e.a.CZ.a(:3)
at ca.simapp.kids.Game.onCreate(:5)
at android.app.Activity.performCreate(Activity.java:5447)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2393)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
at android.app.ActivityThread.access$800(ActivityThread.java:166)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5584)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
08-15 12:15:24.083 588-14754/? E/android.os.Debug: !#Dumpstate > sdumpstate -k -t -z -d -m 14689 -o /data/log/dumpstate_app_error
08-15 12:15:25.994 588-666/? E/ViewRootImpl: sendUserActionEvent() mView == null
08-15 12:15:26.105 588-721/? E/InputDispatcher: channel ~ Channel is unrecoverably broken and will be disposed!
08-15 12:15:31.720 170-420/? E/audio_hw_primary: select_devices_signal starting... adev->out_devices 0x2 adev->in_devices 0x0
08-15 12:15:33.101 588-990/? E/WifiService: SEC_COMMAND_ID_SET_WIFI_SCAN_WITH_P2P : Start scan, start assoc
08-15 12:15:39.197 170-420/? E/audio_hw_primary: select_devices_signal starting... adev->out_devices 0x2 adev->in_devices 0x0
Line 5 in the error points to
import android.content.SharedPreferences;
Hi check this link it seems that some classes has changed between compile and runtime. Now i would suggest to debug by adding and removing libraries which you suspect and create APKs to see which one is causing the error. And keep internet connection proper so you don't get obfuscated log messages.
BTW you can still read obfuscated log using proguard file use that to find the name of the class causing error.

Openh264 throws UnsatisfiedLinkError

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! :)

java.lang.RuntimeException: Unable to create BackupAgent com.berlin.mobson.view.OsmandBackupAgent: java.lang.NullPointerException

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.

Android AutoCompleteTextView Crash on Item Selection (only on HTC Thunderbolt)

Have been getting a really weird error recently from an android app I am developing.
Part of the app has a Map view with a list of locations displayed as an AutoCompleteTextView. On every device and emulator I tested this function performs as expected. However, whenever a user with an HTC Thunderbolt phone (running 2.3.4) tries to select an item in the list, the application crashes.
Here is my stack trace from the Bug Reports I have received:
java.lang.NullPointerException
at com.package.my.e.onItemClick(Unknown Source)
at android.widget.AutoCompleteTextView.performCompletion(AutoCompleteTextView.java:1022)
at android.widget.AutoCompleteTextView.access$1300(AutoCompleteTextView.java:99)
at android.widget.AutoCompleteTextView$DropDownItemClickListener.onItemClick(AutoCompleteTextView.java:1597)
at android.widget.AdapterView.performItemClick(AdapterView.java:284)
at android.widget.ListView.performItemClick(ListView.java:3561)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:1812)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
Any ideas?
Here is what I get when doing Autocompletetextview on Thunderbolt. The white suggestion fields only show suggestions if you press on them. So it seems actv and Thunderbolt is a bad combination.

IndexOutOfBoundsException at android.graphics.Paint.native_measureText(Native Method)

I have an android app on Google Play and occasionally get the following error reported through the developer console / ACRA. The app runs fine on my test devices and on the various AVDs that I test it on.
The stack trace doesn't state where in the app the problem is. Is there anything I can do to narrow down where to look? What generally causes the error?
java.lang.IndexOutOfBoundsException
at android.graphics.Paint.native_measureText(Native Method)
at android.graphics.Paint.measureText(Paint.java:1020)
at android.graphics.Paint.measureText(Paint.java:1057)
at android.text.Styled.drawDirectionalRun(Styled.java:267)
at android.text.Styled.measureText(Styled.java:430)
at android.text.Layout.measureText(Layout.java:1518)
at android.text.Layout.getHorizontal(Layout.java:564)
at android.text.Layout.getHorizontal(Layout.java:548)
at android.text.Layout.getPrimaryHorizontal(Layout.java:533)
at android.widget.TextView$QuickAction.getBound(TextView.java:9550)
at android.widget.TextView$QuickAction.show(TextView.java:9604)
at android.widget.TextView$QuickActionController.show(TextView.java:8846)
at android.widget.TextView.performLongClick(TextView.java:8033)
at android.view.View$CheckForLongPress.run(View.java:9096)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3701)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller
.run(ZygoteInit.java:895)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:653)
at dalvik.system.NativeStart.main(Native Method)
From the look of this, you have a race in your application initialization block. Probably one of your text resources is not fully inflated before a draw is issued. (i know, the model of the android runtime should prevent this, but if this happens when the layout is calculated, it would be plausible).
Hope this is of some help in narrowing it down.

Categories

Resources