CollectionView performs layout when it's been removed from the visibile window #17494
Labels
area-controls-collectionview
CollectionView, CarouselView, IndicatorView
platform/iOS 🍎
t/bug
Something isn't working
Milestone
Description
I've created this issue to track continued work from this issue
I wanted to close the original issue as the regression itself should be resolved but we should still get better testing and an overall assessment done
Notes from PR working around regression
The original PR expressed some concern around this not being an actual fix #17472
While there is some truth to this, this PR just adds some guards to extra code that was added #14951 which would cause an NRE.
ViewWillLayoutSubViews was always getting called when the CollectionView was removed from the Window but the code added from the above PR now called some additional code that needs to be null checked. 14951 has been part of .NET 8 since preview 5; this is the only regression we've so far identified from that PR so we feel like it's a better story to keep that PR as part of SR8 and merge this fix in to manage that regression.
The issue has been narrowed down to a very specific piece of code here. If you comment out this code, then it no longer calls ViewWillLayoutSubviews
This path also only occurs on Shell when you set any styling elements.
I have the recipes app added into the main_recipes branch if you want to see this crash happen against our repository.
Reproduction
The text was updated successfully, but these errors were encountered: