Repository navigation
fix: marshal dialog provider Add/Update onto sync context - #5301
Merged
Vincent Baaij (vnbaaij) merged 1 commit intoSep 18, 2026
Merged
Vincent Baaij (vnbaaij) merged 1 commit into
Vincent Baaij (vnbaaij) merged 1 commit into
Conversation
Shanewas Ahmed (shanewas)
requested review from
Denis Voituron (dvoituron) and
Vincent Baaij (vnbaaij)
as code owners
September 18, 2026 01:27
Author
|
@microsoft-github-policy-service agree |
Shanewas Ahmed (shanewas)
force-pushed
the
fix/dialog-provider-task-run-race
branch
from
September 18, 2026 01:52
f726592 to
420fa2f
Compare
Vincent Baaij (vnbaaij)
requested changes
Sep 18, 2026
Vincent Baaij (vnbaaij)
left a comment
Collaborator
There was a problem hiding this comment.
Hi, Thanks for your contribution but 2 things:
- We are moving into maintenance mode for v4. Final release of v5 is around the corner. That doesn't mean we can't merge this in but might take a bit longer for this to show up in a package
- You must target the
archive-v4branch for this change (since yesterday, wasdevbefore)
ShowDialogAsync and UpdateDialogAsync wrapped the References mutation in Task.Run, racing the UI-thread render enumeration and close-path Remove whenever a dialog opened right after another closed. Run both bodies through InvokeAsync instead, matching the sync ShowDialog path. Fixes microsoft#5300.
Shanewas Ahmed (shanewas)
force-pushed
the
fix/dialog-provider-task-run-race
branch
from
September 18, 2026 06:28
420fa2f to
d45e5b8
Compare
Author
|
Retargeted to archive-v4. Rebased onto 518038a (same 1-file hunk, commit re-signed). Local SDK predates the pinned Roslyn so the full build can't link here; verified zero new errors against pristine base. CI should give the full gate. |
Vincent Baaij (vnbaaij)
approved these changes
Sep 18, 2026
Vincent Baaij (vnbaaij)
merged commit Sep 18, 2026
e224d98
into
microsoft:archive-v4
3 of 4 checks passed
This was referenced Sep 28, 2026
Open
Merged
Merged
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5300.
ShowDialogAsync/UpdateDialogAsyncwrapped theReferencesmutation inTask.Run, racing the UI-thread render enumeration and the close-pathRemovewhenever a dialog opened right after another closed. On Blazor Server this surfaces asArgumentOutOfRangeException, a renderNullReferenceException, or a dead circuit, at a low single-digit percent per cycle.This runs both bodies through
InvokeAsyncinstead, matching the syncShowDialogpath already in this file, so theAdd/Updatealways lands on the renderer's sync context. No behavior change besides removing the race window.ComponentBase.InvokeAsynchas no value-returning overload, so results are captured via locals.Verified:
Microsoft.FluentUI.AspNetCore.Componentsbuilds with 0 errors (net8.0 / net9.0 / net10.0).