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

Memory Leak in Style with Trigger #22036

Closed
markmccaigue opened this issue Apr 24, 2024 · 1 comment · Fixed by #22503
Closed

Memory Leak in Style with Trigger #22036

markmccaigue opened this issue Apr 24, 2024 · 1 comment · Fixed by #22503
Labels
area-xaml XAML, CSS, Triggers, Behaviors fixed-in-8.0.60 fixed-in-9.0.0-preview.5.24307.10 legacy-area-perf Startup / Runtime performance memory-leak 💦 Memory usage grows / objects live forever (sub: perf) platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Milestone

Comments

@markmccaigue
Copy link

markmccaigue commented Apr 24, 2024

Description

A memory leak occurs when an implicit style with an associated trigger is used.

Please see the linked repository for a reproduction, where I have created a rudimentary test harness to illustrate the issue.

Steps to Reproduce

  1. Run the sample at the linked repository
  2. Use the navigate button to navigate to a new page, and press the back arrow to go back to the original page. Repeat this a number of times.
  3. Back on the main page, use the GC button to trigger garbage collections by clicking a few times.
  4. Observe the memory usage does not return to baseline.
  5. Remove the style from the App constructor and repeat the steps above
  6. Observe the memory returns to baseline

Simulator Screenshot - iPX15 4 - 2024-04-24 at 16 43 33
Above: Image with style present

Simulator Screenshot - iPX15 4 - 2024-04-24 at 16 42 31
Above: Image with style removed

Link to public reproduction project repository

https://github.com/markmccaigue/mauitriggerleaktest

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, I was not able test on other platforms

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@markmccaigue markmccaigue added the t/bug Something isn't working label Apr 24, 2024
@PureWeen PureWeen added legacy-area-perf Startup / Runtime performance memory-leak 💦 Memory usage grows / objects live forever (sub: perf) platform/android 🤖 platform/iOS 🍎 labels Apr 24, 2024
@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 25, 2024
@Zhanglirong-Winnie
Copy link

Verified this issue with Visual Studio 17.10.0 Preview 5(8.0.20). Can repro on iOS and android platforms with sample project.

@PureWeen PureWeen added this to the Backlog milestone Apr 28, 2024
@Eilon Eilon added the t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) label May 10, 2024
kubaflo added a commit to kubaflo/maui that referenced this issue May 18, 2024
kubaflo added a commit to kubaflo/maui that referenced this issue May 20, 2024
@PureWeen PureWeen added the area-xaml XAML, CSS, Triggers, Behaviors label May 31, 2024
@samhouts samhouts modified the milestones: Backlog, .NET 8 SR6 Jul 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-xaml XAML, CSS, Triggers, Behaviors fixed-in-8.0.60 fixed-in-9.0.0-preview.5.24307.10 legacy-area-perf Startup / Runtime performance memory-leak 💦 Memory usage grows / objects live forever (sub: perf) platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants