Skip to content

Using CollectionView IsGrouped="True" bound to ObservableCollection causes crash #18481

@megukaphii

Description

@megukaphii

Description

When using a CollectionView where the ItemSource is set to a binding of type ObservableCollection, and IsGrouped is set to True, the app crashes if the ObservableCollection is updated such that: there are more than 2 items in the first group, or there is more than 1 item in any subsequent group.

I tested this by copy+pasting from Microsoft's official CollectionView grouping docs in a brand new project:
https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/grouping

Steps to Reproduce

  1. Download the linked repo
  2. Run the project on Windows and click the "Load Animals" button
  3. Note that the program does not crash if you modify to have only 1 animal in the second "Monkeys" group, and that it does crash if you subsequently add a third animal to the "Bears" group

Expected Outcome: The groups appear correctly.
Actual Outcome: The app crashes without an exception thrown.

Link to public reproduction project repository

https://github.com/megukaphii/GroupedCollectionViewBug

Version with bug

8.0.0-rc.2.9373

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows SDK 10.0.17763.0

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewp/2Work that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions