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

[net7.0] Null check everything in InvalidateMeasureIfContentSizeChanged #17493

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Backport of #17472 to net7.0

/cc @PureWeen @hartez

@PureWeen PureWeen enabled auto-merge (squash) September 19, 2023 20:51
@PureWeen
Copy link
Member

PureWeen commented Sep 19, 2023

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 here 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.

@PureWeen
Copy link
Member

/azp run MAUI-DeviceTests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rmarinho rmarinho disabled auto-merge September 20, 2023 23:15
@rmarinho rmarinho merged commit 83358d7 into net7.0 Sep 20, 2023
@rmarinho rmarinho deleted the backport/pr-17472-to-net7.0 branch September 20, 2023 23:15
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@samhouts samhouts added the fixed-in-7.0.96 Look for this fix in 7.0.96 SR8! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-7.0.96 Look for this fix in 7.0.96 SR8!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants