Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Random Crash on Android after receiving push notification

$
0
0

Hi

Have a bug I have been trying to fix on and off for few weeks.

Have a forms app (using 2.3.3 193, but have tried 2.3.4.192-pre 2 and nightly builds)

Launching app in release (debug is ok) and navigating around the UI app is fine and stable, upon receiving a data push notification, app creates a local push notification so user can click on it. Continue to click happy around UI no problems. Click on local notification, which just re-launches the MainActivity (have removed all code to process the push), app appears ok, click around the app and at a random point, sometime opening a modal screen (3 or 4 times closing each time), sometimes scrolling a list, or pulling to refresh i get a crash

Clicking on local push seems to be only reliable way to reproduce it, if i background the app and bring back to foreground its fine.

caused.AggregateException(s)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():0
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method):0
Android.Runtime.JNIEnv.CallIntMethod(IntPtr jobject, IntPtr jmethod):0
Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss()<27c17fe440cf491ba8255bcefade6e02>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.SwitchContentAsync(Page page, bool animated, bool removed, bool popToRoot)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnPushAsync(Page view, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.PushViewAsync(Page page, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnElementChanged(ElementChangedEventArgs e)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(TElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.Platform.CreateRenderer(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.ModalContainer.Platform(Context context, Page modal)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.PresentModal(Page modal, bool animated)<00979a7978ab4144a58919b163f63751>:0
at Xamarin.Forms.Platform.Android.AppCompat.Platform+d__30.MoveNext () [0x0004a] in <00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Application.NavigationImpl.d__3.MoveNext():0
--- End of inner exception stack trace ---
---> (Inner Exception #0) Java.Lang.RuntimeException: Activity has been destroyed
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
:0
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method):0
Android.Runtime.JNIEnv.CallIntMethod(IntPtr jobject, IntPtr jmethod):0
Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss()<27c17fe440cf491ba8255bcefade6e02>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.SwitchContentAsync(Page page, bool animated, bool removed, bool popToRoot)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnPushAsync(Page view, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.PushViewAsync(Page page, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnElementChanged(ElementChangedEventArgs e)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(TElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.Platform.CreateRenderer(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.ModalContainer.Platform(Context context, Page modal)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.PresentModal(Page modal, bool animated)<00979a7978ab4144a58919b163f63751>:0
at Xamarin.Forms.Platform.Android.AppCompat.Platform+d__30.MoveNext () [0x0004a] in <00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Application.NavigationImpl.d__3.MoveNext():0

Thought is was related to this https://bugzilla.xamarin.com/show_bug.cgi?id=36907 similar stack trace but no code is within OnResume.

This one looks similar too https://bugzilla.xamarin.com/show_bug.cgi?id=47367, but have tried all variations of xamarin forms, even though its supposed to be fixed in Forms 2.3.4.192-pre2, no joy

Any pointers would be appreciated.

Thanks

Neil


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>