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

Rising Memory Consumption when using an ObservableRangeCollection with NotifyCollectionChangedAction.Reset #114

Open
MAUIoxo opened this issue Mar 5, 2024 · 1 comment

Comments

@MAUIoxo
Copy link

MAUIoxo commented Mar 5, 2024

Platform (please complete the following information):

  • OS: [iOS/Both?]
  • Device: [iPhoneSimulator/iPhoner/...]
  • Sdk vervion: [iOS 15.2]
  • .NET MAUI: [8.0.10-nightly.10215]

Describe the bug
When I use an ObservableRangeCollection with the Sharpnado CollectionView, which has any kind of NotifyCollectionChangedAction.Reset, e.g. in an .AddRange(..., NotifyCollectionChangedAction.Reset), I see rising memory consumption and finally a Crash of my App on my real device.

I am not sure if it is the Sharpnado CollectionView, but I just wanted to mention it in case there is an issue.

I described this issue also on the .NET MAUI Issue page more detailled: Rising Memory Consumption leading to crashing App after a while when Utilizing NotifyCollectionChangedAction.Reset in ObservableRangeCollection

To Reproduce
Steps to reproduce the behavior:

  1. Use .AddRange(..., NotifyCollectionChangedAction.Reset) on an ObservableRangeCollection that is bound to a (Sharpnado) CollectionView and see the memory consumption rising. This can also be observed when the same option is used in a .RemoveRange(.., NotifyCollectionChangedAction.Reset) call a couple of times.
  2. Animation and example project can be found on the corresponding issue: Rising Memory Consumption leading to crashing App after a while when Utilizing NotifyCollectionChangedAction.Reset in ObservableRangeCollection
  3. As I said, I am not sure if the Sharpnado CollectionView is involved in there, but just mentioned it in case

Exceptions (if applicable)
There is no StackTrace available

Screenshots (if applicable)
If applicable, add screenshots to help explain your problem.

@MAUIoxo
Copy link
Author

MAUIoxo commented Apr 20, 2024

As mentioned in MAUI Issue 21015 the root cause seems to be in the SharpnadoCollectionView. Is there a possibility to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant