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

[Bug] Shell Deferral is null during a navigation #13131

Closed
pictos opened this issue Dec 13, 2020 · 1 comment · Fixed by #13202
Closed

[Bug] Shell Deferral is null during a navigation #13131

pictos opened this issue Dec 13, 2020 · 1 comment · Fixed by #13202

Comments

@pictos
Copy link
Contributor

pictos commented Dec 13, 2020

Description

If I have a code inside Shell.Navigating event that can throw an NRE on DeferralToken.

Steps to Reproduce

  1. Run the code on the link
  2. Press the Login button
  3. After press the Navigation button a couple of times and after that try to go back using the top arrow.

Expected Behavior

I can navigate without errors.

Actual Behavior

I saw an exception

Basic Information

  • Version with issue: branch 5.0.0
  • Last known good version: NaN
  • Platform Target Frameworks:
    • Android: MonoDroid10
  • NuGet Packages: Xamarin.CommunityToolkit
  • Affected Devices: Android devices

Environment

Visual Studio 2019 16.7.7

Screenshots

https://youtu.be/Acy1WOJvWWQ

Reproduction Link

https://github.com/pictos/Xamarin.Forms.Sandbox/tree/mvpconf

Workaround

The workaround is to add a null check inside the

@pictos pictos added s/unverified New report that has yet to be verified t/bug 🐛 labels Dec 13, 2020
@samhouts samhouts added this to New in Triage Dec 13, 2020
@rmarinho
Copy link
Member

Ok i updated the code so we can run it

https://github.com/rmarinho/Xamarin.Forms.Sandbox/tree/mvpconf

@rmarinho rmarinho added p/Android and removed s/unverified New report that has yet to be verified labels Dec 14, 2020
@rmarinho rmarinho moved this from New to Needs Estimate in Triage Dec 14, 2020
Triage automation moved this from Needs Estimate to Closed Dec 23, 2020
rmarinho pushed a commit that referenced this issue Dec 23, 2020
* Fix NRE if user immediately completes Deferal

Made the deferral flow more linear and easy to follow
Moved the navigation parts of Shell out to a separate class

* - Shell Section Fixes

* - fix unit test name

* - fix spelling

* - fix return value
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Triage
  
Closed
Development

Successfully merging a pull request may close this issue.

4 participants