ArithmeticExcpetion in GridView - android

Hi All I am getting an ArithmeticException in my Google Play crash Reports. I am not able to reproduce it locally hence I have to rely on only these reports.
I am using the GridViews in my app, I am setting the Number of Columns manually instead of setting it to "auto_fit". I am not sure why this crash is happening.
The Following is the stack Trace, any help would be appreciated;
*
java.lang.ArithmeticException: divide by zero
at android.widget.GridView.onInitializeAccessibilityNodeInfo(GridView.java:2296)
at android.view.View.createAccessibilityNodeInfoInternal(View.java:5493)
at android.view.View.createAccessibilityNodeInfo(View.java:5480)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:811)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:834)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:720)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:147)
at android.view.AccessibilityInteractionController.access$300(AccessibilityInteractionController.java:49)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:971)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5748)
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:1291)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
at dalvik.system.NativeStart.main(Native Method)
*
Thanks and Regards,
Shashi Kiran G M

Related

Android crash related to android.app.LoadedApk.makeApplication(LoadedApk.java:563)

An app gets quite a few crashes with the following stack trace
java.lang.RuntimeException:
at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4530)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5258)
at java.lang.reflect.Method.invoke(Native Method:0)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)
Caused by: java.lang.IllegalStateException:
at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:409)
at android.app.LoadedApk.makeApplication(LoadedApk.java:555)
The stack trace does not have any trace of the app's code. Considering the large user base, it is relatively rare (about 1 per 10K active devices per day). I cannot figure out any clues from the above information. Could anyone shed some light on this to help prevent this crash?
Edit (2017-06-14):
The following screenshot of Google Play Console shows that the top 6 crash clusters do not have app code in their stack traces:
java.lang.IllegalArgumentException in android.view.WindowManagerGlobal.findViewLocked
java.lang.IllegalArgumentException
in android.view.WindowManagerGlobal.findViewLocked
java.lang.IllegalArgumentException
in android.view.WindowManagerGlobal.findViewLocked
in tgkill
in tgkill
java.lang.IllegalStateException
in android.app.LoadedApk.initializeJavaContextClassLoader

Fatal Exception: java.lang.ExceptionInInitializerError with AdMob SDK

I got 51 app crashes in 3 days with this crash report:
Fatal Exception: java.lang.ExceptionInInitializerError
at hrh.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hqu.(:com.google.android.gms)
at hrb.(:com.google.android.gms)
at com.google.android.gms.chimera.container.GmsModuleFinder.b(:com.google.android.gms:437)
at com.google.android.gms.chimera.container.DynamiteLoaderImpl.getModuleVersion2(:com.google.android.gms:43)
at krn.onTransact(:com.google.android.gms:83)
at android.os.Binder.transact(Binder.java:361)
at aqb.a(:com.google.android.gms.DynamiteModulesA:155)
at apn.a(:com.google.android.gms.DynamiteModulesA:293)
at apo.a(:com.google.android.gms.DynamiteModulesA:97)
at app.a(:com.google.android.gms.DynamiteModulesA:108)
at apn.a(:com.google.android.gms.DynamiteModulesA:216)
at mu.(:com.google.android.gms.DynamiteModulesA)
at mu.a(:com.google.android.gms.DynamiteModulesA:32)
at com.google.android.gms.ads.internal.overlay.bb.a(:com.google.android.gms.DynamiteModulesA:21)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:537)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:144)
at com.google.android.gms.ads.internal.ClientApi.retainReference(:com.google.android.gms.DynamiteModulesA:312)
at com.google.android.gms.ads.internal.zzn.zza(:com.google.android.gms.DynamiteModulesA:116)
at com.google.android.gms.ads.internal.client.zzz.onTransact(:com.google.android.gms.DynamiteModulesA:81)
at android.os.Binder.transact(Binder.java:361)
at com.google.android.gms.ads.internal.client.zzu$zza$zza.zzaM(Unknown Source)
at com.google.android.gms.ads.internal.client.zzab.destroy(Unknown Source)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source)
at com.google.android.gms.ads.AdView.resume(Unknown Source)
at club.androidy.callcontrolfree.Activities.MainActivity.onCreate(MainActivity.java:182)
at android.app.Activity.performCreate(Activity.java:5289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2272)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
at hbu.a(:com.google.android.gms:1246)
at hbr.b(:com.google.android.gms:198)
at com.google.android.gms.common.threads.internal.GlobalExecutorsImpl.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hrh.(:com.google.android.gms)
at hqu.(:com.google.android.gms)
at hrb.(:com.google.android.gms)
at com.google.android.gms.chimera.container.GmsModuleFinder.b(:com.google.android.gms:437)
at com.google.android.gms.chimera.container.DynamiteLoaderImpl.getModuleVersion2(:com.google.android.gms:43)
at krn.onTransact(:com.google.android.gms:83)
at android.os.Binder.transact(Binder.java:361)
at aqb.a(:com.google.android.gms.DynamiteModulesA:155)
at apn.a(:com.google.android.gms.DynamiteModulesA:293)
at apo.a(:com.google.android.gms.DynamiteModulesA:97)
at app.a(:com.google.android.gms.DynamiteModulesA:108)
at apn.a(:com.google.android.gms.DynamiteModulesA:216)
at mu.(:com.google.android.gms.DynamiteModulesA)
at mu.a(:com.google.android.gms.DynamiteModulesA:32)
at com.google.android.gms.ads.internal.overlay.bb.a(:com.google.android.gms.DynamiteModulesA:21)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:537)
at com.google.android.gms.ads.internal.zzb.zza(:com.google.android.gms.DynamiteModulesA:144)
at com.google.android.gms.ads.internal.ClientApi.retainReference(:com.google.android.gms.DynamiteModulesA:312)
at com.google.android.gms.ads.internal.zzn.zza(:com.google.android.gms.DynamiteModulesA:116)
at com.google.android.gms.ads.internal.client.zzz.onTransact(:com.google.android.gms.DynamiteModulesA:81)
at android.os.Binder.transact(Binder.java:361)
at com.google.android.gms.ads.internal.client.zzu$zza$zza.zzaM(Unknown Source)
at com.google.android.gms.ads.internal.client.zzab.destroy(Unknown Source)
at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source)
at com.google.android.gms.ads.AdView.resume(Unknown Source)
at club.androidy.callcontrolfree.Activities.MainActivity.onCreate(MainActivity.java:182)
at android.app.Activity.performCreate(Activity.java:5289)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2186)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2272)
at android.app.ActivityThread.access$800(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1208)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5135)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
at dalvik.system.NativeStart.main(NativeStart.java)
It's related to AdMob SDK I think
It's happening on all phones with any android version
I'm using SDK version 8.4.0 as the latest version doesn't deliver ads to devices that doesn't have google play services installed.
compile 'com.google.android.gms:play-services-ads:8.4.0'
The line that causes the issue is
mAdView.loadAd(adRequest);
I tried to just catch the exception with try/catch but it seems that's not working because the app is still crashing.
How to solve this.
Thanks in Advance
As Mike Odie said it seems it's a bug and they are trying to handle it.
You can post your logcat and follow the issue here:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/jXQW4gwUEDs
I wanted to put it in an answer in case anyone didn't notice Mike's comment.
Edit:
According to this comment of Vu Chau a member of Mobile Ads SDK Team in 15 Jul
The fix is included in the rollout of Google Play services that is scheduled to be 100% complete towards the end of the month. So, the fix has been live, and as the month draws to a close, you should see the frequency of the crashes gradually decreasing.
I will continue monitoring the rollout progress and let you know if there is any change.
Vu Chau
Mobile Ads SDK Team
So the fix is live now and I already noticed that crashes were stopped.
Thanks.

Android ANR/Crash on 4.4 version

All,
I am facing a ANR/Crash on Android 4.4 devices. Below are the mention log which I received from device. Still I an not able to debug/relate this issue. Could someone please help me to trace and fixed this issue.
at android.view.GLES20Canvas.nDrawDisplayList(Native Method) at
android.view.GLES20Canvas.drawDisplayList(GLES20Canvas.java:420) at
android.view.HardwareRenderer$GlRenderer.drawDisplayList(HardwareRenderer.java:1661)
at
android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1484)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2685) at
android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2551) at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2157) at
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1239) at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6396)
at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
at android.view.Choreographer.doCallbacks(Choreographer.java:613) at
android.view.Choreographer.doFrame(Choreographer.java:583) at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
at android.os.Handler.handleCallback(Handler.java:733) at
android.os.Handler.dispatchMessage(Handler.java:95) at
android.os.Looper.loop(Looper.java:146) at
android.app.ActivityThread.main(ActivityThread.java:5511) 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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at
dalvik.system.NativeStart.main(Native Method)
Please check and help me to fixing this.
Thanks
Amit
Try to disable hardware acceleration for the scrollview at runtime.
View scroll = layout.findViewById(R.id.scrollView1);
scroll.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
I found this for more detailed explanation it may helps you check once
WebView in ScrollView: "View too large to fit into drawing cache" - how to rework layout?

Android: java.lang.NoSuchMethodError: Landroid\/os\/Handler when calling FacebookSdk.sdkInitialize()

I have an Android app used Facebook for login.
However, I got some user bug reports reporting "java.lang.NoSuchMethodError" when doing facebook initialization.
java.lang.NoSuchMethodError: Landroid\/os\/Handler;.
at android.support.v4.content.l.(LocalBroadcastManager.java:110)
at android.support.v4.content.k.(LocalBroadcastManager.java:110)
at android.support.v4.content.LocalBroadcastManager.getInstance(LocalBroadcastManager.java:102)
at com.facebook.internal.BoltsMeasurementEventListener.open(BoltsMeasurementEventListener.java:53)
at com.facebook.internal.BoltsMeasurementEventListener.getInstance(BoltsMeasurementEventListener.java:70)
at com.facebook.FacebookSdk.sdkInitialize(FacebookSdk.java:169)
at my.app.MyApplication.onCreate(MyApplication.java:119)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4464)
at android.app.ActivityThread.access$1500(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:212)
at android.app.ActivityThread.main(ActivityThread.java:5137)
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:902)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:718)
at dalvik.system.NativeStart.main(Native Method)
What would be the possible cause of this issue?
I am too late to answer (Help to others) but I solved this problem and I am not sure if it can work for others too.
I added a release key hash together with the debug key hash in the developers.facebook.com/................
and it worked.
Lets see if it works for others too.

android.view.View.sendAccessibilityEventUncheckedInternal error only HTC One Mini

Hi I got this error from Fabric. It's only come from "HTC one mini" . Why did you come ?? It is a specific error this model ??
java.lang.NullPointerException
at android.view.View.sendAccessibilityEventUncheckedInternal(View.java:5020)
at android.view.View.sendAccessibilityEventUnchecked(View.java:5001)
at android.view.View$SendViewStateChangedAccessibilityEvent.run(View.java:19761)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5872)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:674)
at dalvik.system.NativeStart.main(NativeStart.java)
I didn't understand but our user removed 360 Security app and application run perfect.
I know it's an old question but I stumbled upon the same problem and I found that answer which helped me : https://stackoverflow.com/a/20892109/2637428
I'm commenting this issue as it was the first one I found before finding the other one.

Categories

Resources