Repository navigation
fix: Get master CI green (macOS WebView crash, NativeAOT, slow-host waits) - #25093
Conversation
The script completion handlers passed UTF8String pointers of temporary NSStrings, which ARC may release before the managed callback copies them, so the callback could read freed memory: the intermittent SIGSEGV in the WebView2 ExecuteScriptAsync tests on the macOS WebGPU lane. Hold the strings until the callback returns, and complete the awaiting task asynchronously instead of inside WebKit's completion handler. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
GetReferencedAssemblies throws PlatformNotSupportedException under NativeAOT, which failed the Android+NativeAOT lane on every master build. The JIT platforms check the same assembly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
ScrollToAndWait took a second without ViewChanged as the end of the scroll, but an animated scroll only advances on presented frames, so a multi-second frame stall on the SwiftShader WebGPU lane returned mid scroll (null containers, no new items). Wait for the final ViewChanged. Give the first-frame keyframe test and the iOS focus visual waits room for slow hosts too; both only bound a failure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
Rendering takes the latest frame time of the targets armed in a tick, so a second target puts it a fraction of a frame after the driver's. Bound the drift by a frame instead of requiring equal steps, which failed intermittently on iOS. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
The Release build takes 40-50 min and was cancelled by the 60 min default on master. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
|
Claude finished @MartinZikmund's task in 27s —— View job Review summaryVerdict: looks good, with minor comments. I reviewed the diff by inspection only. I did not build or run anything. Findings: 0 high, 0 medium, 2 low (posted inline).
Cross-cutting notes
|
|
The build 238019 found UI Test snapshots differences: Details
|
ScrollToAndWait returned silently on timeout, leaving a later assertion to report it with a misleading message. The reference check skipped on any PlatformNotSupportedException; it now does so only where dynamic code is unsupported (NativeAOT), and fails on a JIT runtime. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
|
Claude finished @MartinZikmund's task in 15s —— View job Review summaryVerdict: ship. I reviewed the diff by inspection only. I did not build or run anything, and the Objective-C change can only be checked by the native macOS CI stage. Findings: 0 high, 0 medium, 0 new. The two low-severity points from the earlier review still stand: Cross-cutting notes
|
|
The build 238107 found UI Test snapshots differences: Details
|
ContentDialog.When_Window_Resized (6 of the last 40 builds, 3 branches) and AnimatedVisualPlayer.When_PlaybackRate_Zero_Keeps_Progress_Stable (4 builds, 3 branches) time out intermittently on the iOS simulator. Tracked in #25104 and #25105. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
|
Claude finished @MartinZikmund's task in 16s —— View job Review summaryVerdict: ship. I reviewed the diff by inspection only. I did not build or run anything. Only the native macOS CI stage can check the Objective-C change. Findings: 0 high, 0 medium, 0 low, 0 new. No inline comments. Earlier comments, now resolved in e205b9f
Cross-cutting notes
|
Every project importing wgpu-native.targets, and each of its target
frameworks, shares the obj cache, so a cold parallel build downloaded
the same zip concurrently and failed with MSB3923 ("being used by
another process"), as in the managed binaries build of 238126. Fetch
into a per-run staging folder and copy the result into the cache with
retries.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z
|
Claude finished @MartinZikmund's task in 18s —— View job Review summaryVerdict: ship, with one low-severity note. I reviewed by inspection only. I did not build or run anything. Findings: 0 high, 0 medium, 1 low, 0 inline comments. New since the last review:
Earlier points: The comments from the previous rounds were resolved in UI test snapshot diffs (builds 238019 and 238107): This PR doesn't touch rendering code, so it cannot cause these. Compare against a plain master build. |
|
The build 238138 found UI Test snapshots differences: Details
|
GitHub Issue: closes #25092
PR Type:
🐞 Bugfix
What changed? 🚀
Fixes the final (post-retry) failures on master
Uno.UI - CIbuilds 237946, 237914, 237886 and 237879:fix(macos): Desktop macOS WebGPU lane crashed (SIGSEGV) inGiven_WebView2.When_ExecuteScriptAsync*(2 of the last 6 master builds).uno_webview_execute_script/uno_webview_invoke_scripthanded the managed callbackUTF8Stringpointers of temporaryNSStrings ([[[NSString alloc] initWithData:…] UTF8String],quoted.UTF8String,error.description.UTF8String); under ARC those strings can be freed before the callback copies them. The strings are now held (NS_VALID_UNTIL_END_OF_SCOPE) until the callback returns. The awaiting task also completes asynchronously, instead of running the caller's continuation (in CI: the rest of the test and the next one) inside WebKit's completion handler.test(2dsk): Android+NativeAOT failed every build inWhen_Graphics3DGL_Not_Referenced_By_Graphics2DSK:GetReferencedAssemblies()throwsPlatformNotSupportedExceptionunder NativeAOT. Reported as inconclusive there; the JIT platforms check the same assembly.test: WASM WebGPU ListView scroll failures (When_Large_List_Scroll_To_End_Then_Back_Up_And_First_Item*,When_ThemeChange):ScrollToAndWaittook one second withoutViewChangedas the end of the scroll, but an animated scroll only advances on presented frames, and the SwiftShader lane stalls for seconds. It now waits for the final (IsIntermediate == false)ViewChanged, or for the offset already being at the target. The first-frame keyframe test and the iOSGiven_SystemFocusVisualrender waits get timeouts that only bound a failure.test(composition):When_Frame_Driver_And_Rendering_Then_Same_Frame_Timefailed intermittently on iOS with a 0.1-0.2 ms step mismatch: Rendering takes the latest frame time of all targets armed in a tick. The drift is now bounded by one frame interval instead of requiring equal steps.ci: iOS TestFlight was cancelled by the 60 min default timeout mid-build (its Release build takes 40-50 min); the job gets 90 min.test(ios): two recurring iOS flakes excluded on iOS with follow-up issues:Given_ContentDialog.When_Window_Resized(6 of the last 40 builds, 3 branches, [iOS] Flaky test: Given_ContentDialog.When_Window_Resized times out #25104) andGiven_AnimatedVisualPlayer.When_PlaybackRate_Zero_Keeps_Progress_Stable(4 builds, 3 branches, [iOS] Flaky test: Given_AnimatedVisualPlayer.When_PlaybackRate_Zero_Keeps_Progress_Stable times out #25105). The other top iOS flake,When_Frame_Driver_And_Rendering_Then_Same_Frame_Time(11 builds), is covered by the drift bound above: every recorded failure drifted 0.04-0.3 ms.fix(webgpu):Build - Managed Binariesfailed withMSB3923 ... being used by another process(build 238126). Every project importingwgpu-native.targets, and each of its target frameworks, shares theobj\wgpu-nativecache, so a cold parallel build downloaded the same zip concurrently._FetchWgpuNativenow fetches into a per-run staging folder and copies the result in with retries. Reproduced locally with four parallel_FetchWgpuNativeruns on a cold cache: 3 of 4 failed with the CI error before, 4 of 4 pass after.Not addressed: one-off flakes that passed on retry (
Given_FlipView.When_TouchFlick_Then_FlipOneItemon Windows, already tracked under #9080, among others).Validation:
net11.0-desktop(incl.Uno.UI.RuntimeTests.Skia,Uno.UI.Runtime.MacOS). The Objective-C change is compiled by this PR's native macOS build stage.When_ThemeChange, which fails locally on unchanged master too (first assertion, a theme/environment difference) and is exercised by CI.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code
https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z