Rg.Plugins.Popup icon indicating copy to clipboard operation
Rg.Plugins.Popup copied to clipboard

PopupPageRenderer.onWindowVisibilityChanged PopupPageRenderer Java.Interop.JavaLocationException

Open chuvakpavel opened this issue 4 years ago • 14 comments

🐛 Bug Report

I have a lot of crashes in AppCenter.

PopupPageRenderer.onWindowVisibilityChanged
PopupPageRenderer.java, line 74
Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
O
Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
java.lang.Error: Java callstack:
crc643dd37f507f3d9710.PopupPageRenderer.n_onWindowVisibilityChanged(Native Method)
crc643dd37f507f3d9710.PopupPageRenderer.onWindowVisibilityChanged PopupPageRenderer.java:74
android.view.View.dispatchWindowVisibilityChanged View.java:14782
android.view.ViewGroup.dispatchWindowVisibilityChanged ViewGroup.java:1593
android.view.ViewGroup.dispatchWindowVisibilityChanged ViewGroup.java:1597
com.android.internal.policy.DecorView.dispatchWindowVisibilityChanged DecorView.java:3626
android.view.ViewRootImpl.performTraversals ViewRootImpl.java:2562
android.view.ViewRootImpl.doTraversal ViewRootImpl.java:2200
android.view.ViewRootImpl$TraversalRunnable.run ViewRootImpl.java:8999
android.view.Choreographer$CallbackRecord.run Choreographer.java:996
android.view.Choreographer.doCallbacks Choreographer.java:794
android.view.Choreographer.doFrame Choreographer.java:729
android.view.Choreographer$FrameDisplayEventReceiver.run Choreographer.java:981
android.os.Handler.handleCallback Handler.java:883
android.os.Handler.dispatchMessage Handler.java:100
android.os.Looper.loop Looper.java:237
android.app.ActivityThread.main ActivityThread.java:7860
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:493
com.android.internal.os.ZygoteInit.main ZygoteInit.java:1075

TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)

TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)
Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type)
Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
View.n_OnWindowVisibilityChanged_I (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_visibility)
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.78(intptr,intptr,int)

Expected behavior

Works without crashes.

Most Affected OS

  • 10 - 75.0%
  • 8.0.0 - 16.7%
  • 6.0.1 - 8.3%

Version: 2.0.0.5 and 2.0.0.7

Platform:

  • [x] :robot: Android
  • [x] :monkey: Xamarin.Forms

chuvakpavel avatar Nov 20 '20 07:11 chuvakpavel

@chuvakpavel Does this occur with local builds? if so, can you provide a test sample to work with?

LuckyDucko avatar Nov 25 '20 01:11 LuckyDucko

@LuckyDucko, no, I don't see it in local builds. Only in AppCenter.

chuvakpavel avatar Nov 25 '20 07:11 chuvakpavel

@chuvakpavel without a reproducible build, I can only recommend that @martijn00 close this

LuckyDucko avatar Dec 02 '20 23:12 LuckyDucko

Hi! We also got a lot of these crashes! Visible in AppCenter as well. Not being able to provide a reproducible build does not mean that the issue does not exist. It is a little bit bad to close the issue for that reason 🤷‍♂️ Moreover this isn't the first issue mentioning this problem that has been closed without really providing a solution (https://github.com/rotorgames/Rg.Plugins.Popup/issues/509, https://github.com/rotorgames/Rg.Plugins.Popup/issues/430). I am aware that my comment does not help providing a solution, but you can't run away for ever! 😄

EmmanuelJego avatar Dec 08 '20 19:12 EmmanuelJego

@EmmanuelJego I understand, it does seem to be an issue floating about, fixed in #430, but has come back. I just have no way of even attempting to debug this not do I have any experience with AppCenter, and since it works outside of AppCenter, it makes me think that perhaps it has something to do with AppCenter, and not this plugin. I cannot reopen this issue, but if someone brings it up again (such as yourself), I promise to stop running and we will leave it open in the hope that someone can help us track down this elusive bug.

LuckyDucko avatar Dec 09 '20 00:12 LuckyDucko

@LuckyDucko Yeah I understand that this kind of issues is really hard to fix since we don't have any starting point... AppCenter is just a Microsoft service that you can connect to your app to see all crashes reports, and even some analytics. The issue can't come from that service since its purpose is just to send crashes reports. It just helps us to see crashes reports, how often they appear, on which devices, etc. Which is pretty useful as its enables us to discover crashes that we don't notice on our test devices. If only I could borrow the devices of our clients who experience this crash, I could debug it, but as you can imagine, that is not conceivable 😄 These crashes seems indeed to appear only on a few different devices, but quite often. I suspect this issue to be related to some configuration, but I am not able to tell more since, as @chuvakpavel mentioned, different Android versions are impacted...

EmmanuelJego avatar Dec 09 '20 00:12 EmmanuelJego

AppCenter is just a Microsoft service that you can connect to your app to see all crashes reports

Oh, that does change things. If you are able to get Device models, then that would really help try and narrow down this issue, since either we can investigate what is different about those devices (perhaps the UI skin on top of android), or even try and reproduce it through emulation/We get lucky and someone has the device.

LuckyDucko avatar Dec 09 '20 00:12 LuckyDucko

@LuckyDucko

Android 10: Galaxy S10e, P20Pro, Galaxy A50, Galaxy A71, Galaxy Note10+, Galaxy J6, Galaxy A51, Redmi Note 8 pro, Mi A2, Galaxy S10, Galaxy A7(2018)

Android 8: Galaxy A5(2017)

chuvakpavel avatar Dec 09 '20 07:12 chuvakpavel

I'll complete the @LuckyDucko's list with Galaxy Tab Active 2 (Android 9)

That is a lot of Samsung devices 🤔

EmmanuelJego avatar Dec 09 '20 07:12 EmmanuelJego

I'll complete the @LuckyDucko's list with Galaxy Tab Active 2 (Android 9)

That is a lot of Samsung devices 🤔

Samsung is a most popular android smartphone producer I guess, especially in US, AU and EU

AlexeyStarkov avatar Jan 11 '21 08:01 AlexeyStarkov

me too, not only Sansung Devices, also Xiaomi, LG, Android All, Rg.Plugin.Popup 2.0.0.10

From AppCenter

Java.Lang.Error: Exception of type 'Java.Lang.Error' was thrown.
java.lang.Error: Java callstack:
crc643dd37f507f3d9710.PopupPageRenderer.n_onWindowVisibilityChanged(Native Method)
crc643dd37f507f3d9710.PopupPageRenderer.onWindowVisibilityChanged(Unknown Source:0)
android.view.View.dispatchWindowVisibilityChanged View.java:13859
android.view.ViewGroup.dispatchWindowVisibilityChanged ViewGroup.java:1601
android.view.ViewGroup.dispatchWindowVisibilityChanged ViewGroup.java:1605
android.view.ViewRootImpl.performTraversals ViewRootImpl.java:2144
android.view.ViewRootImpl.doTraversal ViewRootImpl.java:1819
android.view.ViewRootImpl$TraversalRunnable.run ViewRootImpl.java:7781
android.view.Choreographer$CallbackRecord.run Choreographer.java:1031
android.view.Choreographer.doCallbacks Choreographer.java:854
android.view.Choreographer.doFrame Choreographer.java:789
android.view.Choreographer$FrameDisplayEventReceiver.run Choreographer.java:1016
android.os.Handler.handleCallback Handler.java:883
android.os.Handler.dispatchMessage Handler.java:100
android.os.Looper.loop Looper.java:224
android.app.ActivityThread.main ActivityThread.java:7562
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run RuntimeInit.java:539
com.android.internal.os.ZygoteInit.main ZygoteInit.java:950
TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)
TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType)
Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type)
Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer)
View.n_OnWindowVisibilityChanged_I (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 native_visibility)
(wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.163(intptr,intptr,int)

giuseppenovielli avatar Mar 01 '21 09:03 giuseppenovielli

me too, not only Sansung Devices, also Xiaomi, LG, Android All, Rg.Plugin.Popup 2.0.0.10

Well, there goes that idea.

I wonder, does AppCenter have something similar with firebase where you have initialise it using the app context?

Perhaps there might be some merit in looking into using the CrossCurrentActivity plugin?

this is a complete spitball, but I am honestly at a loss with this

LuckyDucko avatar Mar 16 '21 00:03 LuckyDucko

I've been able to reproduce a similar error (with a different stack) when closing a popup page, but only when the android accessibility setting for "remove animations" is set to ON. this explains why I was seeing this failure for specific users. I don't know how many different parts of the plugin can result in this PopupPageRenderer.dispatchTouchEvent issue, but I certainly found one.

I've got other popup pages elsewhere in the app which do not fail in the same manner, which makes things especially confusing. But one of the pages fails every single time if animations are disabled in the device's settings.

MitchBomcanhao avatar Feb 23 '23 14:02 MitchBomcanhao

For me this issue only happens for users running our app in a country other than the US. Not sure if this is helpful or not.

Country, Language

  • Brazil, Portuguese
  • South Africa, English
  • Ireland, English
  • Spain, Spanish

markdou812 avatar Jul 12 '23 12:07 markdou812