Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

ArgumentOutOfRangeException in Android NavigationPageRenderer #4069

Closed
radioactiveman opened this issue Oct 12, 2018 · 6 comments
Closed

ArgumentOutOfRangeException in Android NavigationPageRenderer #4069

radioactiveman opened this issue Oct 12, 2018 · 6 comments
Labels
has-stacktrace Bugs without reproductions but that contain a stack trace. p/Android s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue.

Comments

@radioactiveman
Copy link

radioactiveman commented Oct 12, 2018

Description

Our crash reports contain an unhandled ArgumentOutOfRangeException in the Android NavigationPageRenderer. 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

  • Version with issue: 3.2.0.839982
  • Last known good version: Unknown
  • IDE: Visual Studio 2017
  • Platform Target Frameworks:
    • Android: 7.0
  • Android Support Library Version: 27.0.2.1
  • Affected Devices: Multiple vendors and devices, Android 6 - 8
@samhouts samhouts added p/Android has-stacktrace Bugs without reproductions but that contain a stack trace. labels Oct 14, 2018
@samhouts
Copy link
Member

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!

@samhouts samhouts added s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. labels Oct 14, 2018
@radioactiveman
Copy link
Author

The app uses MvvmCross with its NavigationService to do all the navigation. We use neither master detail pages nor modal pages.

@hartez hartez removed s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. s/needs-repro ❔ This reported issue doesn't include a sample project reproducing the issue. Please provide one. labels Oct 18, 2018
@radioactiveman
Copy link
Author

@hartez Any update on this issue? Your changes in #4132 are only relevant for Android, how can they make iOS tests fail? Are they not false positives?

@hartez
Copy link
Contributor

hartez commented Dec 10, 2018

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 MvxPagePresentationAttribute WrapInNavigationPage or NoHistory options?

@hartez hartez added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label Dec 10, 2018
@radioactiveman
Copy link
Author

Thanks for the fast answer. The relevant version of the app uses MvvmCross 5.7.0.
We released a new version recently and updated MvvmCross to 6.2.2.
So far we have no crash reports about this anymore. I will keep an eye on it and reopen this issue if required.

@hartez
Copy link
Contributor

hartez commented Dec 11, 2018

I'm wondering if this and #4708 might be related.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has-stacktrace Bugs without reproductions but that contain a stack trace. p/Android s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue.
Projects
None yet
Development

No branches or pull requests

4 participants
@hartez @radioactiveman @samhouts and others