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

Cascading memory leak when StrokeShape is set on Border control on iOS #20121

Closed
AdamEssenmacher opened this issue Jan 23, 2024 · 5 comments
Closed
Assignees
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing delighter-sc memory-leak 💦 Memory usage grows / objects live forever partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/iOS 🍎 t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Milestone

Comments

@AdamEssenmacher
Copy link

AdamEssenmacher commented Jan 23, 2024

Description

Setting the StrokeShape property on a Border control in iOS results in the control and its containing page to leak.

Page-level leaks are serious, as they prevent child elements from being collected as well.

Steps to Reproduce

  1. Push a page that contains a Border with its StrokeShape property set
  2. Pop the page
  3. Force GC runs
  4. Observe the page is never collected

Link to public reproduction project repository

https://github.com/AdamEssenmacher/iOSBorderLeak.Maui

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

iOS

Affected platform versions

iOS 17.2

Did you find any workaround?

No response

Relevant log output

No response

@AdamEssenmacher AdamEssenmacher added the t/bug Something isn't working label Jan 23, 2024
@samhouts samhouts added the area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing label Jan 25, 2024
@AdamEssenmacher
Copy link
Author

Would the area/perf label be appropriate here as well? This issue causes entire pages (and possibly nav stacks) not to be GC'ed, which causes noticeable performance degradation once the app starts needing swap space, and ultimately leading to forced app termination.

@samhouts samhouts added partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with legacy-area-perf Startup / Runtime performance memory-leak 💦 Memory usage grows / objects live forever labels Apr 4, 2024
@PureWeen PureWeen added this to the .NET 8 SR5 milestone Apr 5, 2024
@jsuarezruiz jsuarezruiz self-assigned this Apr 8, 2024
@jsuarezruiz
Copy link
Contributor

Thanks for the details and the sample Adam. Cannot reproduce in main branch, could you try with the latest nightly package?
border-leak-issue

@jsuarezruiz jsuarezruiz added the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Apr 8, 2024
@jsuarezruiz
Copy link
Contributor

Could have been fixed by #21151

@AdamEssenmacher
Copy link
Author

@jsuarezruiz I just confirmed this appears to be fixed in 8.0.40-nightly.10455

@dotnet-policy-service dotnet-policy-service bot removed the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Apr 9, 2024
@jonathanpeppers
Copy link
Member

Thanks! Fix was:

@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2024
@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing delighter-sc memory-leak 💦 Memory usage grows / objects live forever partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/iOS 🍎 t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
Status: Done
Development

No branches or pull requests

6 participants