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

"ObjectDisposedException" When Toggling Header/Footer in CollectionView Dynamically #25724

Closed
praveenkumarkarunanithi opened this issue Nov 7, 2024 · 2 comments · Fixed by #25743
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-9.0.21 partner/syncfusion Issues / PR's with Syncfusion collaboration platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@praveenkumarkarunanithi
Copy link
Contributor

praveenkumarkarunanithi commented Nov 7, 2024

Description

When dynamically toggling the header or footer in a CollectionView by setting it to null and then re-assigning it, a System.ObjectDisposedException occurs. The exception message indicates that a disposed object.

"Make sure that in the MauiProgram file, the CollectionView2 handlers are not registered or used."

Steps to Reproduce

  1. Open and run the attached CollectionView sample code in sandbox project.
  2. Click the "Toggle Header" button once and observe that the header is removed from the UI.
  3. Click the "Toggle Header" button again to re-add the header to the CollectionView.
  4. Observe that an exception is thrown at this point.

Link to public reproduction project repository

No response

Version with bug

8.0.92 SR9.2

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@praveenkumarkarunanithi praveenkumarkarunanithi added t/bug Something isn't working platform/macOS 🍏 macOS / Mac Catalyst platform/iOS 🍎 labels Nov 7, 2024
@praveenkumarkarunanithi
Copy link
Contributor Author

Issue reproduced with iOS 18.1 in iphone 16 with maui sandbox project code removed in MauiProgram on the sandbox app that uses the CollectionView2 Handlers.
CollectionViewHeaderException.zip

@jaosnz-rep jaosnz-rep added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Nov 7, 2024
@jaosnz-rep
Copy link

I can repro this issue at macOS platform on the latest VS Code for Mac(1.95.1)(9.0.0-rc.2.24503.2 & 8.0.92).
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-9.0.21 partner/syncfusion Issues / PR's with Syncfusion collaboration platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants