Skip to content

fix: Get master CI green (macOS WebView crash, NativeAOT, slow-host waits) - #25093

Merged
MartinZikmund merged 8 commits into
masterfrom
dev/mazi/master-ci-green
Oct 8, 2026
Merged

MartinZikmund merged 8 commits into
masterfrom
dev/mazi/master-ci-green

Conversation

@MartinZikmund

@MartinZikmund MartinZikmund commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

GitHub Issue: closes #25092

PR Type:

🐞 Bugfix

What changed? 🚀

Fixes the final (post-retry) failures on master Uno.UI - CI builds 237946, 237914, 237886 and 237879:

  • fix(macos): Desktop macOS WebGPU lane crashed (SIGSEGV) in Given_WebView2.When_ExecuteScriptAsync* (2 of the last 6 master builds). uno_webview_execute_script/uno_webview_invoke_script handed the managed callback UTF8String pointers of temporary NSStrings ([[[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 in When_Graphics3DGL_Not_Referenced_By_Graphics2DSK: GetReferencedAssemblies() throws PlatformNotSupportedException under 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): ScrollToAndWait took one second without ViewChanged as 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 iOS Given_SystemFocusVisual render waits get timeouts that only bound a failure.

  • test(composition): When_Frame_Driver_And_Rendering_Then_Same_Frame_Time failed 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) and Given_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 Binaries failed with MSB3923 ... being used by another process (build 238126). Every project importing wgpu-native.targets, and each of its target frameworks, shares the obj\wgpu-native cache, so a cold parallel build downloaded the same zip concurrently. _FetchWgpuNative now fetches into a per-run staging folder and copies the result in with retries. Reproduced locally with four parallel _FetchWgpuNative runs 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_FlipOneItem on Windows, already tracked under #9080, among others).

Validation:

  • Compile: SamplesApp 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.
  • Runtime (Skia desktop, Windows): all changed tests pass, except When_ThemeChange, which fails locally on unchanged master too (first assertion, a theme/environment difference) and is exercised by CI.

PR Checklist ✅

  • 🧪 Added Runtime tests, UI tests, or a manual test sample (for bug fixes / features, if applicable)
  • 📚 Docs have been added/updated following the documentation template (for bug fixes / features)
  • 🖼️ Validated PR Screenshots Compare Test Run results.
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests (optional but appreciated!)

🤖 Generated with Claude Code

https://claude.ai/code/session_016JuV6BPjWEEXzuX2RUEE3z

MartinZikmund and others added 5 commits October 7, 2026 22:08
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
Copilot AI balanced review requested due to automatic review settings October 7, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 27s —— View job


Review summary

Verdict: 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).

  • Assert.Inconclusive in When_Graphics3DGL_Not_Referenced_By_Graphics2DSK. This is a style and coverage concern under the repo rules.
  • ScrollToAndWait still returns silently when it times out.

Cross-cutting notes

  • The macOS UNOWebView.m change addresses the dangling UTF8String pointers. I'd call it a root-cause fix for the lifetime bug. RunContinuationsAsynchronously is a separate hardening change. Native macOS CI is the only real validation of the Objective-C part.
  • The composition test now checks drift against FrameIntervalInTicks rather than exact equality. That is a weaker assertion, but it is justified by the Rendering semantics you describe.
  • The timeoutInMinutes: 90 change for TestFlight is reasonable.
  • The PR title and commits follow Conventional Commits.

@github-actions github-actions Bot added platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/build Categorizes an issue or PR as relevant to build infrastructure labels Oct 7, 2026
@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238019 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1153

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • Examples.png
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DropDownButtonPage.png-dark
  • skia-windows-screenshots: 1153 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppBarButtonWithIconTest.png
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoSuggestBox_Keyboard.png-dark
    • AutoSuggestBox_Keyboard.png
    • BitmapIcon_Monochromatic.png-dark
    • BitmapIcon_Monochromatic.png
    • BorderCenteredwithmargins.png-dark
    • BorderCenteredwithmargins.png
    • Border_CornerRadius_Alignments.png-dark
    • Border_CornerRadius_Alignments.png
    • Button_IsEnabled_Automated.png-dark
    • Button_IsEnabled_Automated.png
    • CenteredGridinGridwiththreefixedsizechildren.png-dark
    • CenteredGridinGridwiththreefixedsizechildren.png
    • ComboBox_Legacy.png-dark
    • ComboBox_Legacy.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png

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
Copilot AI balanced review requested due to automatic review settings October 8, 2026 07:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 15s —— View job


Review summary

Verdict: 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: Assert.Inconclusive in the NativeAOT case, and ScrollToAndWait returning silently on timeout. I'm not repeating them inline.

Cross-cutting notes

  • UNOWebView.m: The change is a root-cause fix for the lifetime bug. r, e and the invoke-path e are now held with NS_VALID_UNTIL_END_OF_SCOPE, and .UTF8String is read at the call site. In uno_webview_invoke_script, result is the completion handler's own parameter, so it stays valid for the callback. Nothing else is needed there.
  • RunContinuationsAsynchronously: This is defensive hardening, separate from the lifetime fix, and it's labelled that way in the PR. It's a sound choice, since the test's continuation no longer runs inside WebKit's handler.
  • Composition test: The new check is weaker. It bounds the offset spread by one frame interval where it used to require equal steps. That matches the "latest frame time of all armed targets" semantics, so I accept it.
  • Timeouts: The timeoutMS additions (5 s for the iOS focus-visual waits, 30 s for the keyframe wait) only bound failures. The TestFlight timeoutInMinutes: 90 is reasonable.
  • UI test snapshot diffs (build 238019): The report shows 118 Linux and 1153 Windows changes. This PR only touches runtime tests, the macOS native WebView code and a pipeline YAML, so none of it can alter rendering. The size and spread point to a baseline or infrastructure problem. Check that build against a plain master build before treating it as caused by this PR.
  • Conventions: The PR title and commits follow Conventional Commits, and the changes use tabs and braces as the repo requires.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238107 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1127

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
  • skia-windows-screenshots: 1127 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AutoBorderStretchwithrightmargin.png
    • AutomationProperties_Relations.png-dark
    • AutoSuggestBox_BitmapIcon.png-dark
    • AutoSuggestBox_BitmapIcon.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BorderBottomwithmargins.png-dark
    • BorderBottomwithmargins.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • BorderVersusPanelClipping.png-dark
    • BorderVersusPanelClipping.png
    • Button_Opacity_Automated.png-dark
    • Button_Opacity_Automated.png
    • Capture with overlap.png-dark
    • Capture with overlap.png
    • ComboBox_IsSelected.png-dark
    • ComboBox_IsSelected.png
    • ComboBox_Stretch.png-dark

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
Copilot AI balanced review requested due to automatic review settings October 8, 2026 08:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 16s —— View job


Review summary

Verdict: 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

  • Assert.Inconclusive in When_Graphics3DGL_Not_Referenced_By_Graphics2DSK: The catch is now when (!RuntimeFeature.IsDynamicCodeSupported). The same exception on a JIT runtime fails the test instead of being swallowed. Your reason for not using [PlatformCondition] holds: RuntimeTestPlatforms has no NativeAOT value, and excluding SkiaAndroid would also drop the JIT Android lanes. I accept the Inconclusive on NativeAOT.
  • ScrollToAndWait returning silently on timeout: It now calls Assert.Fail with the target, offset, scrollable height and whether the final ViewChanged arrived. The handler is also unsubscribed in finally, which the first version didn't do.

Cross-cutting notes

  • UNOWebView.m:
    • This is a root-cause fix for the lifetime bug. r and e are now NSString locals held with NS_VALID_UNTIL_END_OF_SCOPE, and .UTF8String is taken at the call site.
    • In uno_webview_invoke_script, result is the handler's own parameter, so it stays valid. Only e needed the same treatment.
    • RunContinuationsAsynchronously is defensive hardening, separate from the lifetime fix, and the PR labels it that way.
  • Composition test: Bounding the drift by one frame interval is weaker than requiring equal steps. It matches the "latest frame time of all armed targets" behaviour, so I accept it.
  • Timeouts: The timeoutMS additions only bound failures. timeoutInMinutes: 90 for TestFlight is reasonable.
  • UI test snapshot diffs (builds 238019 and 238107): The report shows 118 Linux and about 1,130 Windows changes. This PR touches only runtime tests, the macOS native WebView code and a pipeline YAML, so none of it can change rendering. The two builds show nearly identical counts, which points to a baseline or infrastructure problem. Compare against a plain master build before attributing it to this PR.
  • Conventions: The PR title and commits follow Conventional Commits. The changes use tabs and braces as the repo requires.

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
Copilot AI balanced review requested due to automatic review settings October 8, 2026 09:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @MartinZikmund's task in 18s —— View job


Review summary

Verdict: 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: f966af5c, wgpu-native.targets

  • Approach: Each fetch downloads and unzips into a GUID-named staging folder, then copies into the shared cache. That removes the concurrent writes to the same zip, which is the root cause of the "being used by another process" failure. Checking Exists(lib\$(_WgpuNativeFile)) instead of the zip is also better, because the zip is no longer left in the cache.
  • Low, partial-file window: The Copy writes straight to the final path, and that path is also the existence check other projects use. A project that evaluates _WgpuNeedsFetch while another is mid-copy could see a partly written native library and skip its own fetch. This is narrow, since the lib is copied in one task. If you want it airtight, copy the lib last, or copy to a temp name and move it. I wouldn't block on this.
  • Low, staging cleanup: RemoveDir runs only if the earlier tasks succeed. A failed download leaves an orphaned stage\<guid> folder in the cache. It is harmless.
  • PR description: The description doesn't mention this change. Consider adding a line. It is also a build-system fix, not a test fix, so the PR title's scope list is now slightly incomplete.

Earlier points: The comments from the previous rounds were resolved in e205b9fe and I have nothing to add. I still recommend watching the UNOWebView.m change on the native macOS stage.

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.
· branch dev/mazi/master-ci-green

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 238138 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 1143

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • Examples.png
    • DropDownButtonPage.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • DynamicFont.png-dark
    • DynamicFont.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
  • skia-windows-screenshots: 1143 changed over 2474

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AutomationProperties_AutomationId.png-dark
    • AutomationProperties_AutomationId.png
    • Basics.png-dark
    • Basics.png
    • BitmapIcon_Foreground.png-dark
    • BitmapIcon_Foreground.png
    • BorderLeftwithmargins.png-dark
    • BorderLeftwithmargins.png
    • BorderVersusPanelClipping.png-dark
    • BorderVersusPanelClipping.png
    • Border_Simple_No_Background_With_TextBox.png-dark
    • Border_Simple_No_Background_With_TextBox.png
    • Button_Opacity_Automated.png-dark
    • Button_Opacity_Automated.png
    • ChatBox.png-dark
    • ChatBox.png
    • AnimatedIconPage.png
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewSpanningRectsPage.png-dark

@MartinZikmund
MartinZikmund merged commit 3c5a302 into master Oct 8, 2026
61 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/master-ci-green branch October 8, 2026 11:06
@ramezgerges ramezgerges mentioned this pull request Oct 27, 2026
2 of 5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Categorizes an issue or PR as relevant to build infrastructure area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Master CI failures: macOS WebView crash, NativeAOT reference test, slow-host waits, TestFlight timeout

3 participants