My application is facing random crashes for real users. Unfortunately I can not reproduce it. Has any one has more insight on the issue, or have a solution for the crash? The stack trace is as follows.
java.lang.IllegalArgumentException: path must be convex
at android.graphics.Outline.setConvexPath(Outline.java:284)
at android.graphics.drawable.GradientDrawable.getOutline(GradientDrawable.java:1745)
at android.view.ViewOutlineProvider$1.getOutline(ViewOutlineProvider.java:38)
at android.view.View.rebuildOutline(View.java:17362)
at android.view.View.invalidateDrawable(View.java:22675)
at android.graphics.drawable.Drawable.invalidateSelf(Drawable.java:457)
at android.graphics.drawable.Drawable.setVisible(Drawable.java:866)
at android.view.View.onVisibilityAggregated(View.java:13928)
at android.view.View.dispatchDetachedFromWindow(View.java:20062)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3995)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3987)
at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3987)
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5588)
at android.view.ViewGroup.removeViewAt(ViewGroup.java:5535)
at android.support.v7.widget.RecyclerView$5.removeViewAt(RecyclerView.java:877)
at android.support.v7.widget.ChildHelper.removeViewAt(ChildHelper.java:168)
at android.support.v7.widget.RecyclerView$LayoutManager.removeViewAt(RecyclerView.java:8374)
at android.support.v7.widget.RecyclerView$LayoutManager.removeAndRecycleViewAt(RecyclerView.java:8647)
at android.support.v7.widget.LinearLayoutManager.recycleChildren(LinearLayoutManager.java:1369)
at android.support.v7.widget.LinearLayoutManager.recycleViewsFromEnd(LinearLayoutManager.java:1449)
at android.support.v7.widget.LinearLayoutManager.recycleByLayoutState(LinearLayoutManager.java:1482)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1508)
at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1331)
at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1075)
at android.support.v7.widget.RecyclerView.scrollStep(RecyclerView.java:1832)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5067)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:693)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7045)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
I found this stackoverflow post but it is not useful in my case. The issue appears to be happening while drawing RecyclerView. I use custom background for RecyclerView items which I suspect might be the reason.
Related
I got a ANR report on firebase. Its count is increasing and I cannot figure out this since it does not mention anywhere on my code. This is the ANR on firebase console.
main (native): tid=1 systid=5789
at libcore.io.Linux.access(Linux.java)
at libcore.io.ForwardingOs.access(ForwardingOs.java:72)
at libcore.io.BlockGuardOs.access(BlockGuardOs.java:73)
at libcore.io.ForwardingOs.access(ForwardingOs.java:72)
at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:7766)
at java.io.UnixFileSystem.checkAccess(UnixFileSystem.java:281)
at java.io.File.exists(File.java:815)
at android.app.ContextImpl.ensureExternalDirsExistOrFilter(ContextImpl.java:2889)
at android.app.ContextImpl.getExternalFilesDirs(ContextImpl.java:773)
at android.content.ContextWrapper.getExternalFilesDirs(ContextWrapper.java:289)
at androidx.core.content.ContextCompat$Api19Impl.getExternalFilesDirs(ContextCompat.java:847)
at androidx.core.content.ContextCompat.getExternalFilesDirs(ContextCompat.java:409)
at androidx.core.content.FileProvider.parsePathStrategy(FileProvider.java:691)
at androidx.core.content.FileProvider.getPathStrategy(FileProvider.java:635)
at androidx.core.content.FileProvider.attachInfo(FileProvider.java:416)
at android.app.ActivityThread.installProvider(ActivityThread.java:7471)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6950)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6845)
at android.app.ActivityThread.access$1400(ActivityThread.java:244)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1959)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:7889)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
Any idea how to get rid of this ANR?
I'm getting this error in pre-lauch report and have looked everywhere on the internet but haven't found a solution. I'm not sure how to correct this error. Our application is written in react-native. Please I would really appreciate any help
Error in Pre-launch report:
FATAL EXCEPTION: main
Process: com.nuba.mobile.android, PID: 18007
java.lang.IllegalStateException: Cannot perform this action on a sealed instance.
at android.view.accessibility.AccessibilityNodeInfo.enforceNotSealed(AccessibilityNodeInfo.java:2992)
at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:818)
at android.view.accessibility.AccessibilityNodeInfo.setSource(AccessibilityNodeInfo.java:795)
at android.view.accessibility.AccessibilityNodeInfo.obtain(AccessibilityNodeInfo.java:3008)
at android.view.View.createAccessibilityNodeInfoInternal(View.java:7897)
at android.view.View.createAccessibilityNodeInfo(View.java:7883)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchDescendantsOfRealNode(AccessibilityInteractionController.java:1051)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:876)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:199)
at android.view.AccessibilityInteractionController.-wrap1(Unknown Source:0)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1225)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
They tested it on this device for example.
enter image description here
I have attached the logcat
https://codeshare.io/78O6Z1
I have an android app that has a second module included in the app when the main activity starts an activity in the module everything is good. The problem is if you go to another app and then resume this app the activity crashes with a null object pointer. My app uses Esri ArcGIS runtime SDK. I have a MapView open in the activity when the crash occurs. I don't have any problem with an open map in the MainActivity and the app goes to the background then back to the current app.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.thevillages.myfirstapp, PID: 23267
java.lang.RuntimeException: Unable to resume activity {com.thevillages.myfirstapp/com.thevillages.maplib.MapNavActivity}: com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer.: object cannot be null.
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer.: object cannot be null.
at com.esri.arcgisruntime.internal.jni.CoreGeoView.nativeResume(Native Method)
at com.esri.arcgisruntime.internal.jni.CoreGeoView.b(SourceFile:5)
at com.esri.arcgisruntime.a.i.f.g.d(SourceFile:3)
at com.esri.arcgisruntime.mapping.view.GeoView$RenderingThread.resume(SourceFile:4)
at com.esri.arcgisruntime.mapping.view.MapView.resume(SourceFile:1)
at com.thevillages.maplib.MapNavActivity.onResume(MapNavActivity.java:816)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)
at android.app.Activity.performResume(Activity.java:7939)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
I systematically went through my onCreate() method and added each piece of the code to find where the problem was. I found some code that was suspicious and I could not recall why I added the code. With the code removed the app works fine.
Someone already asked this question but was put on hold so I thought I'd try. We both had the same problem at about the same time so I was wondering if it was possibly a problem with Facebook Sdk?
Or I possibly did something but it felt like this error came out of no where and can no longer login to Facebook using the app I making.
Anyway, the error is
On the FacebookProvider.java file, the FacebookSdk.setWebDialogTheme(theme); has the setWebDialogTheme part in red. This is a read-only file so I don't think I could have accidentally changed it.
The error message is:
FATAL EXCEPTION: main
Process: gospa.hugomatica.com.gospa, PID: 3578
java.lang.NoSuchMethodError: No static method setWebDialogTheme(I)V in
class Lcom/facebook/FacebookSdk; or its super classes (declaration of
'com.facebook.FacebookSdk' appears in
/data/app/ga.matica.com.ga-_n-bcJLql8g_mU0q1hjX8g==/split_lib_dependencies_apk.apk)
at
com.firebase.ui.auth.provider.FacebookProvider.(FacebookProvider.java:67)
at
com.firebase.ui.auth.util.signincontainer.IdpSignInContainer.onCreate(IdpSignInContainer.java:124)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2329)
at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1377)
at
android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
at
android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
at
android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
at
android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
at
android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
at
android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
at
android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 09-28
10:02:52.889 3578-3578/gospa.hugomatica.com.gospa E/UncaughtException:
java.lang.NoSuchMethodError: No static method setWebDialogTheme(I)V in
class Lcom/facebook/FacebookSdk; or its super classes (declaration of
'com.facebook.FacebookSdk' appears in
/data/app/ga.matica.com.ga-_n-bcJLql8g_mU0q1hjX8g==/split_lib_dependencies_apk.apk)
at
com.firebase.ui.auth.provider.FacebookProvider.(FacebookProvider.java:67)
at
com.firebase.ui.auth.util.signincontainer.IdpSignInContainer.onCreate(IdpSignInContainer.java:124)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2329)
at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1377)
at
android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1740)
at
android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1809)
at
android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:799)
at
android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2580)
at
android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2367)
at
android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2322)
at
android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2229)
at
android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Sorry,if I didn't format correctly, new to stack overflow
UPDATE: FirebaseUI has been updated to fix this issue. There should be no problems now.
The latest update to the Facebook SDK for android moved the [set|get]WebDialogTheme methods to a different class. FirebaseUI needs to be updated accordingly upstream.
Source : Facebook SDK Changelog
Relevant text from source:
Moves FacebookSDK.[set|get]WebDialogTheme(...) to WebDialog.[set|get]WebDialogTheme(...)
You may try using either an older version of the Facebook SDK, or wait for FirebaseUI to incorporate the appropriate change.
what worked for me was to go back to an earlier version of FB:
compile 'com.facebook.android:facebook-android-sdk:4.25.0'
4.26.0 somehow did not work for me when Syncing and 4.27 is the new version mentioned in the previous answer.
all FB versions available at:
https://developers.facebook.com/docs/android/downloads
In our Android mobile application (compatible with Android versions 4.0 and upper), we use Google Maps API V2.
We get some bug reports from users on some kinds of devices (Android versions 4.3, 4.4 and 5.0) with a NullPointerException in setBoundsInParent method of android.view.accessibility.AccessibilityNodeInfo class.
The application crashes when the user tries to move or to zoom on the map.
The problem only appears for some users - devices. Most of our customers do not have that problem.
The problem seems to come from the use of the setPadding method of Google Maps API to position the Google logo so that it is always clearly visible on the map :
#Override
protected void onCreate(Bundle savedInstanceState)
{
...
// Initialize map
...
// Sets the padding for the map
if(mMap!=null)
{
mMap.setPadding(0, DPI.toPixels(100), 0, DPI.toPixels(100));
}
...
}
Removing the call to the setPadding method seems to resolve the problem for affected users but it is not a valid solution for us because we need to position the Google logo with this method.
We cannot reproduce this problem on our development devices, so it's difficult for us to find the real origin of this problem.
You will find the full stacktraces of the bug below.
Does someone have an idea?
Thanks a lot in advance for your answer.
Best regards.
Stacktrace on Android 4.3 - 4.4
java.lang.NullPointerException
at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(AccessibilityNodeInfo.java:1012)
at android.support.v4.view.a.k.c(SourceFile:819)
at android.support.v4.view.a.i.b(SourceFile:1850)
at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
at android.support.v4.widget.ab.a(SourceFile:56)
at android.support.v4.widget.ac.a(SourceFile:717)
at android.support.v4.view.a.x.a(SourceFile:112)
at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:724)
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:106)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5212)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)
Stacktrace on Android 5.0
java.lang.NullPointerException: Attempt to read from field 'int android.graphics.Rect.left' on a null object reference
at android.view.accessibility.AccessibilityNodeInfo.setBoundsInParent(AccessibilityNodeInfo.java:1316)
at android.support.v4.view.a.k.c(SourceFile:819)
at android.support.v4.view.a.i.b(SourceFile:1850)
at com.google.maps.api.android.lib6.c.et.a(Unknown Source)
at android.support.v4.widget.ab.a(SourceFile:56)
at android.support.v4.widget.ac.a(SourceFile:717)
at android.support.v4.view.a.x.a(SourceFile:112)
at android.support.v4.view.a.ad.createAccessibilityNodeInfo(SourceFile:42)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:894)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:155)
at android.view.AccessibilityInteractionController.access$400(AccessibilityInteractionController.java:53)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1236)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
The bug has been confirmed by Google : http://code.google.com/p/gmaps-api-issues/issues/detail?id=7619
Best regards.