You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
AdvancedCollectionView crashes with ArgumentOutOfRangeException with live shaping (filtering) #4813
As the title says, binding the collection to an ItemsRepeater and changing properties it's being filtered by (specifically, showing items) makes it crash with the aforementioned exception.
Regression
none
Reproducible in sample app?
This bug can be reproduced in the sample app.
Steps to reproduce
The WinUI stuff is incredibly difficult to debug due to no working source link and a very, very, VERY buggy WrapLayout implementation, but once I narrowed it down to the collection and cloned this project, the steps to reproduce this seems to be as so:
The source collection is in a state like [PASS, PASS, FAIL, FAIL, FAIL], where PASS means it passes the live shaping filter and FAIL the opposite.
Update it to [PASS, PASS, FAIL, PASS, FAIL], where the new item to show isn't in the first contiguous part, nor at the very end. This is important because of the case it falls into the large chain of conditions in HandleItemAdded.
Expected behavior
I would simply expect the advanced view collection to work.
I am aware of #4349, but that's been around and open for years. I ran into this problem this week so it was never fixed.
Also my fix is more localized and it strictly improves my specific problem. I can't say it fixes every problem with this function, but at least it doesn't make it worse. Given the propensity of WinUI to just crash out of the blue, one fix today is much more important than more fixes 2 years later.
Activity
myblindy commentedon Dec 7, 2022
I am aware of #4349, but that's been around and open for years. I ran into this problem this week so it was never fixed.
Also my fix is more localized and it strictly improves my specific problem. I can't say it fixes every problem with this function, but at least it doesn't make it worse. Given the propensity of WinUI to just crash out of the blue, one fix today is much more important than more fixes 2 years later.