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

WinUI crash at shell navigation #20514

Closed
sasharp opened this issue Feb 12, 2024 · 5 comments
Closed

WinUI crash at shell navigation #20514

sasharp opened this issue Feb 12, 2024 · 5 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@sasharp
Copy link

sasharp commented Feb 12, 2024

Description

WinUI crashes at navigation inside shell with System.Runtime.InteropServices.COMException: 'The text associated with this error code could not be found.
MAUICrash
Conditions for crash are:

  1. The CollectionView should have more than 100 items
  2. Items should have Border
  3. There is ShellContent inside of FyoutItem

Steps to Reproduce

Click 1. item, go back.
Click 2. item, go back.
Click 3. item, go back.
Click 4. Item...

Sometimes the crash occurs by click on another elements.

Link to public reproduction project repository

https://github.com/sasharp/MAUI8Bugs

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

try catch, but then freeses flyout half opened

Relevant log output

No response

@sasharp sasharp added the t/bug Something isn't working label Feb 12, 2024
@drasticactions
Copy link
Contributor

image

If you let the program run, you would have seen the message. It's a cycle layout issue. You're only seeing it sometimes because your CollectionView has a default border, which is causing your CollectionView list to load slower than if you change it to something else (Like the StrokeShape to RoundRectangle.) Since it's not fully realized, you can navigate. Once it's done loading, it will fail.

image

If you include that change, the CollectionView should load straight away, and then will crash every time you navigate. Removing the border stopping the crashing. Also, if I switched your app to use NavigationPage and not use shell, it also stopped the crashing with the existing XAML (So, with Border)

@PureWeen I'm not sure if this is

  • A Shell Issue
  • A CollectionView Issue
  • A Border Issue
  • Some mix of all of them.

It does seem to only happen under Shell, but I'm not sure what could cause the layout cycle from it over NavigationPage.

@drasticactions
Copy link
Contributor

Also, that the CollectionView is loading all 250+ items in its list (as in, they are fully rendered and in the UI and never seem to unload) seems like a bug with Virtualization. Page navigation is painfully slow on that page and it's using 300+ Megs of memory on that page alone. That shouldn't be the case, so there could be another bug here with Virtualization.

@PureWeen PureWeen added platform/windows 🪟 s/needs-info Issue needs more info from the author area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-controls-collectionview CollectionView, CarouselView, IndicatorView and removed s/needs-info Issue needs more info from the author labels Feb 12, 2024
@PureWeen PureWeen added this to the Backlog milestone Feb 12, 2024
@ghost
Copy link

ghost commented Feb 12, 2024

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@dotnet dotnet deleted a comment Feb 12, 2024
@PureWeen
Copy link
Member

Can you test with the latest nightly build?
https://github.com/dotnet/maui/wiki/Nightly-Builds

@sasharp
Copy link
Author

sasharp commented Feb 14, 2024

@PureWeen with the version 8.0.10-nightly.10050 I can't reproduce the issue. It works.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/windows 🪟 t/bug Something isn't working
3 participants