-
Notifications
You must be signed in to change notification settings - Fork 1.9k
ArgumentOutOfRangeException in Android NavigationPageRenderer #4069
Comments
Are you able to provide any more context into the structure of your app? Are you using a MasterDetailPage? Modal pages? Do you change the MainPage of your app at any time? Thanks! |
The app uses MvvmCross with its NavigationService to do all the navigation. We use neither master detail pages nor modal pages. |
The changes aren't making the iOS tests fail; the new test doesn't pass on iOS. And that's because it shouldn't - the whole situation is invalid. A NavigationPage should never be in a situation where it's visible and does not have a root page. So the actual bug isn't the lack of a null check; something else is going wrong to cause this situation. Which version of MvvmCross does your application use? Are you using the |
Thanks for the fast answer. The relevant version of the app uses MvvmCross 5.7.0. |
I'm wondering if this and #4708 might be related. |
Description
Our crash reports contain an unhandled
ArgumentOutOfRangeException
in the AndroidNavigationPageRenderer
. Unfortunately I could never reproduce the crash myself.Stacktrace.txt
I guess this exception occurs here in line 621 because there is no check if the collection is empty. My suggestion is to use
FirstOrDefault()
with a null check.Steps to Reproduce
Unknown
Expected Behavior
No unhandled exception causing a crash.
Actual Behavior
App crashes.
Basic Information
The text was updated successfully, but these errors were encountered: