Repository navigation
fix(wasm): Request a record so the splash is removed (backport #24260) - #25767
Merged
agneszitte merged 1 commit intoOct 27, 2026
Merged
Conversation
ShowCore waits for CompositionTarget.FrameRendered, which is raised only from the record pass, but asked for it with IXamlRootHost.InvalidateRender - a present request that never sets RenderRequested. When the target has already painted ahead of time, the resulting tick records nothing, the event never fires, and the bootstrap loader stays up forever. Route the request through ICompositionTarget.RequestNewFrame, whose every state converges on a Render, so FrameRendered is guaranteed after the handler subscribes. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Up3PthZrnrxxYK2g8NVgWD (cherry picked from commit 9656bf8)
2 of 5 tasks
agneszitte
approved these changes
Oct 27, 2026
1 of 2 tasks
This was referenced Nov 9, 2026
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.
GitHub Issue: closes #23586
PR Type:
🐞 Bugfix
What changed? 🚀
WASM Skia apps intermittently stay on the bootstrap loading screen. The app is fully running — and, as it turns out, fully rendered: hiding the loader on a stuck device reveals a correctly laid out, painted app underneath. Only the splash removal never happens. Tapping the screen recovers it.
WebAssemblyWindowWrapper.ShowCorewaits forCompositionTarget.FrameRendered, which is raised from exactly one place — the end ofCompositionTarget.Render(), i.e. the record pass. But to trigger it, it called((IXamlRootHost)host).InvalidateRender(), which only asks for a present. That never setsRenderRequested, andEnqueueRenderCallbackonly reachesRender()through that flag:So when the target has already painted ahead of time — the normal state once the tree has settled, which is exactly where
ShowCore's continuation runs after the font preload — the requested tick consumes_renderedAheadOfTime, records nothing, andFrameRenderedis never raised. The one-shot subscription waits forever and the loader is never removed. BecausePersistBootstrapperLoader()disables the bootstrapper's own removal, there is no timeout or fallback.This also explains the recovery asymmetry: a tap dirties the tree, which forces a record and fires the event, while a resize whose canvas dimensions are unchanged only produces a present and leaves the app stuck.
The fix routes the request through the API that actually marks the target as needing a record:
All three states in
RequestNewFrameconverge on a subsequentRender(), soFrameRenderedis guaranteed to be raised after the handler subscribes.Note this is a different defect from the one addressed by #23590 (which re-armed a dropped
requestAnimationFrame). That fix was correct as far as it went, but the render pump was not the remaining problem —requestAnimationFrameis verifiably alive and firing in ~3 ms in the stuck state, and the frame had already been produced.Validation
What is proven. On a physical device (Samsung SM-F966B, Android 16, Edge 151) driven over USB via the
DevTools protocol, a stuck instance was captured and inspected live:
requestAnimationFramefiring normally (3 ms),document.visibilityState: visible.uno-loaderrevealed the app fully rendered underneath — correct layout, text and listSo the frame exists and the render pump is healthy; only the splash removal never happens. That rules out
a dropped
requestAnimationFrameas the remaining cause and points at theFrameRenderedsubscription,which the state machine above shows cannot be guaranteed by
InvalidateRender(). The recovery asymmetrycorroborates it: a tap dirties the tree and forces a record (recovers), while a synthetic
resizewithunchanged canvas dimensions produces only a present (does not recover).
What is not proven. The hang is rare enough that I could not demonstrate the fix statistically. Using a
harness that reloads the app against a deliberately slowed origin (40 ms per asset) and checks whether
.uno-loaderclears, the observed rate was 1 stuck in 32 runs (~3%) before the fix and 0 in 24 runsafter. At a 3% rate, 0-in-24 would occur ~48% of the time by chance, so the post-fix run is not evidence
of anything on its own. The case for this change rests on the captured stuck instance and the state
machine, not on that comparison.
A deterministic regression test is the right follow-up: it needs a seam to put the target into
_renderedAheadOfTimeat the moment the handler subscribes, then assert thatFrameRenderedis stillraised. Happy to add that here or separately.
PR Checklist ✅
_renderedAheadOfTimestate at the momentShowCoresubscribes; happy to add that as a follow-up if wanted.Screenshots Compare Test Runresults.This is an automatic backport of pull request #24260 done by [Mergify](https://mergify.com).