-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add some defensive code around layout propagation #24217
Conversation
The failure on CI is reporting the wrong result for some reason |
/backport to main |
Started backporting to main: https://github.com/dotnet/maui/actions/runs/10410298401 |
@PureWeen backporting to main failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Add some defensive code around layout propagation
.git/rebase-apply/patch:95: trailing whitespace.
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M eng/Versions.props
Falling back to patching base and 3-way merge...
Auto-merging eng/Versions.props
CONFLICT (content): Merge conflict in eng/Versions.props
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Add some defensive code around layout propagation
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@PureWeen an error occurred while backporting to main, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
This reverts commit d85c05f. # Conflicts: # eng/Versions.props
Description of Change
We still haven't been able to reproduce this issue ourselves, but based on users stack traces we have identified certain areas that might cause these exceptions.
All of the changes in this PR are good changes to make. None of these changes are purely a guess that doesn't have some other functional benefit.
My guess is that the fix to
NavigationRenderer
andWrapperView
are probably what's resolving the crash most directly. In .NET MAUI we try to never actually dispose of anything because it can lead to the exceptions that users are seeing.The fixes around
LayoutIfNeeded
are somewhat of a guess and do run the risk of just pushing this bug down the road.That being said, not calling
LayoutIfNeeded
when we aren't part of the visual tree is a valid change to make and this change will at least make this path not crash.Issues Fixed
Fixes #24032