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

TabView breaks Navigation and causes memory leaks. #4718

Closed
Noemata opened this issue Apr 1, 2021 · 4 comments
Closed

TabView breaks Navigation and causes memory leaks. #4718

Noemata opened this issue Apr 1, 2021 · 4 comments
Labels

Comments

@Noemata
Copy link

Noemata commented Apr 1, 2021

Describe the bug
Just by adding the TabView control to a page, it breaks Navigation and causes memory leaks.

Steps to reproduce the bug

App2.zip

Steps to reproduce the behavior:

  1. Build App attached above.
  2. Run App.
  3. Select Page navigation buttons and observe Page deconstructors being called.
  4. Close App.
  5. Uncomment TabView control on Page 1 Xaml.
  6. Run App.
  7. Select Page navigation buttons and observe Page 1 deconstructor not being called causing memory leaks.

Expected behavior

Page 1 deconstructor should be called so its memory resources can be reclaimed.

Screenshots

n/a

Version Info

NuGet package version:
[Microsoft.UI.Xaml.2.6.0-prerelease.210315002]

Windows 10 version Saw the problem?
October 2020 Update (19042) Yes
Device form factor Saw the problem?
Desktop Yes

Additional context
This issue affects every release of the TabView control, including those in the Community Toolkit, so the problem predates integration into WinUI.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 1, 2021
@StephenLPeters StephenLPeters added area-TabView team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Apr 2, 2021
@lukeblevins
Copy link
Contributor

#3597

Could this be related to the issue I reported last year?

@Noemata
Copy link
Author

Noemata commented Apr 2, 2021

@duke7553 , I wouldn't be able to speculate on that. Just adding the control and not using it was enough to cause Navigation to leak. Have a look at the code. I don't have much experience with the control, I was looking into an issue someone else had posted. Would be helpful to have other eyes on the code samples.

There are curious interactions with Navigation Frame and NavigationCacheMode. NavigationCacheMode="Enabled" seems to trigger a memory leak regardless of what controls you are using. TabView seems to have additional problems.

For additional context, you can look here: #4713

@Noemata
Copy link
Author

Noemata commented Apr 6, 2021

The following testing tool is mostly self explanatory if you have a close look at the code: https://github.com/Noemata/RosettaNavigation

The tool may be used to test both performance and Navigation Frame memory issues for both WinUI and UWP.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants