Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Android, after RemovePage and Navigation.PopAsync() Unhandled Exception (Xamarin Forms 2.3.4)

$
0
0

I got 4 pages in NavigationStack. I try to remove a 3rd page and popasync a last page, to navigate to page 2.

Navigation.RemovePage(Navigation.NavigationStack[Navigation.NavigationStack.Count - 2]);
await Navigation.PopAsync();

RemovePage is working but after call await Navigation.PopAsync() => Unhandled Exception

04-10 15:04:47.706 I/MonoDroid( 2358): UNHANDLED EXCEPTION:
04-10 15:04:47.726 I/MonoDroid( 2358): System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
04-10 15:04:47.726 I/MonoDroid( 2358): Parameter name: index
04-10 15:04:47.726 I/MonoDroid( 2358): at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00000] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:93
04-10 15:04:47.726 I/MonoDroid( 2358): at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/throwhelper.cs:56
04-10 15:04:47.726 I/MonoDroid( 2358): at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x0000c] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/collections/generic/list.cs:181
04-10 15:04:47.726 I/MonoDroid( 2358): at +d__4.MoveNext () [0x00012]
04-10 15:04:47.726 I/MonoDroid( 2358): --- End of stack trace from previous location where exception was thrown ---
04-10 15:04:47.726 I/MonoDroid( 2358): at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
04-10 15:04:47.726 I/MonoDroid( 2358): at System.Runtime.CompilerServices.AsyncMethodBuilderCore.m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
04-10 15:04:47.726 I/MonoDroid( 2358): at Android.App.SyncContext+c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/4468/b16fb820/source/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:35
04-10 15:04:47.726 I/MonoDroid( 2358): at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/4468/b16fb820/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36
04-10 15:04:47.726 I/MonoDroid( 2358): at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/4468/b16fb820/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Java.Lang.IRunnable.cs:81
04-10 15:04:47.726 I/MonoDroid( 2358): at (wrapper dynamic-method) System.Object:3e5470d0-62e9-4b18-89b5-1d02e4924742 (intptr,intptr)

I tested it at UWP and it works, only on Android it is not working.

Any solutions are welcome, i need to go back more than one page.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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