Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] ModalStack is broken (PushModalAsync, PopModalAsync [Android]) #11270

Open
Phenek opened this issue Nov 10, 2022 · 4 comments
Open

[Bug] ModalStack is broken (PushModalAsync, PopModalAsync [Android]) #11270

Phenek opened this issue Nov 10, 2022 · 4 comments
Labels
area-controls-modal area-navigation NavigationPage platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Phenek
Copy link

Phenek commented Nov 10, 2022

Description

I am testing the Modal Stack Navigation behavior.

First point, when I am pushing 10 popups rapidly,
The last page on the modal stack is not necessary the one display on front (on the device).

Second point, when I poping with a button all pages one by one rapidly,
I can have at the end an empty modal stack, but still have one or more modal page displayed.

Steps to Reproduce

  1. In MainPage.cs change the click too
private void OnPushClicked(object sender, EventArgs e)
{
   Application.Current.MainPage.Navigation.PushModalAsync(new MainPage2());
}
  1. On a second MainPage2.cs
private void OnPopClicked(object sender, EventArgs e)
{
  Application.Current.MainPage.Navigation.PopModalAsync();
}
  1. Run and click verry fast on the centered button.
    At the end I still have one popup displayed even if the ModalStack is empty
    and the PopModalAsync() does not pop anymore.
    also the RemovePage() had never removed the specifiq modal page.
    It should.

PS: It is really hard to reproduce with good hardware, so please use bad hardware.
If you can not push 10 popups at once it's because you have a too good hardware.

WIth a LENOVO TAB M10, I can reproduce each time.

Link to public reproduction project repository

I made a reproduction project on .Net7
https://github.com/Phenek/Maui-Issue/tree/issue/11270

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11, 12, 13

Did you find any workaround?

No

Relevant log output

No response

@ghost
Copy link

ghost commented Nov 11, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@Phenek
Copy link
Author

Phenek commented May 10, 2023

Hey,

When two PopModalAsync() are called simultaneously the app can freeze.
Even if I await them using a boolean to prevent two calls to overlap.

  if (_isBusy) return;
  _isBusy = true;
  await Application.Current.MainPage.Navigation.PopModalAsync();
  _isBusy = false;

So PopModalAsync() is returning a Task.CompletedTask; even if the process is not technically completed...

@homeyf homeyf added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Aug 15, 2023
@ghost
Copy link

ghost commented Aug 15, 2023

Hi @Phenek. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@homeyf homeyf added s/verified Verified / Reproducible Issue ready for Engineering Triage and removed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Aug 15, 2023
@homeyf
Copy link

homeyf commented Aug 15, 2023

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0(.NET8). Can repro on android platform with sample project.
https://github.com/Phenek/Maui-Issue/tree/issue/11270
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-modal area-navigation NavigationPage platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants