diff --git a/.github/skills/perf-compare/SKILL.md b/.github/skills/perf-compare/SKILL.md index 3b5e45eb2..213f359b5 100644 --- a/.github/skills/perf-compare/SKILL.md +++ b/.github/skills/perf-compare/SKILL.md @@ -58,8 +58,8 @@ reconcile/diff phase — those read *n/a*. (committed) and `git status --porcelain` (uncommitted). If both are empty, tell the user there is nothing to compare and stop. 3. **Capability check.** The harness opens a real WinUI window. If you are - running on a headless box, runs will crash with `0xC000027B` right after - `MountAndActivate ok`. If a first run fails that way, do **not** keep + running on a headless box, runs will crash with `0xC000027B` during + first-frame window activation. If a first run fails that way, do **not** keep retrying — report it (see [Failure handling](#failure-handling)). ### 2. Set up the `main` baseline worktree diff --git a/src/Reactor/Hosting/ReactorApp.cs b/src/Reactor/Hosting/ReactorApp.cs index 01ad70399..7ed6264c2 100644 --- a/src/Reactor/Hosting/ReactorApp.cs +++ b/src/Reactor/Hosting/ReactorApp.cs @@ -480,30 +480,16 @@ internal static ReactorWindow OpenWindowCore( Action? configure, bool excludeFromShutdownPolicy = false) { - Console.Error.WriteLine("[embed:trace] OpenWindowCore enter (embed=" + (spec.Embed is not null) + ")"); - ReactorWindow window; - try - { - window = new ReactorWindow(spec); - window.ExcludeFromShutdownPolicy = excludeFromShutdownPolicy; - Console.Error.WriteLine("[embed:trace] OpenWindowCore: ReactorWindow ctor ok"); - } - catch (Exception ex) - { - Console.Error.WriteLine("[embed:trace] ReactorWindow ctor THREW: " + ex); - throw; - } - try { configure?.Invoke(window.Host); Console.Error.WriteLine("[embed:trace] OpenWindowCore: configure ok"); } - catch (Exception ex) { Console.Error.WriteLine("[embed:trace] configure THREW: " + ex); throw; } + ReactorWindow window = new ReactorWindow(spec); + window.ExcludeFromShutdownPolicy = excludeFromShutdownPolicy; + configure?.Invoke(window.Host); RegisterWindow(window); try { window.MountAndActivate(rootFactory, renderFunc); - Console.Error.WriteLine("[embed:trace] OpenWindowCore: MountAndActivate ok"); } - catch (Exception ex) + catch { - Console.Error.WriteLine("[embed:trace] MountAndActivate THREW: " + ex); UnregisterWindow(window); try { window.Dispose(); } catch { /* best effort */ } throw; diff --git a/src/Reactor/Hosting/ReactorWindow.cs b/src/Reactor/Hosting/ReactorWindow.cs index e0644ac48..ca56fb7c5 100644 --- a/src/Reactor/Hosting/ReactorWindow.cs +++ b/src/Reactor/Hosting/ReactorWindow.cs @@ -338,27 +338,14 @@ internal ReactorWindow(WindowSpec spec) if (spec.Embed is { } embed) { - Console.Error.WriteLine("[embed:trace] entering embed setup (style=" + embed.Style + " hostPid=" + embed.HostPid + ")"); - try - { - VerifyEmbedDpiAwareness(embed.Style); - Console.Error.WriteLine("[embed:trace] VerifyEmbedDpiAwareness ok"); - ApplyEmbedInitialStyles(embed.Style); - Console.Error.WriteLine("[embed:trace] ApplyEmbedInitialStyles ok"); - _embedWatchdog = new EmbedHostWatchdog(); - _embedWatchdog.Start(embed.HostPid, () => - { - try { NativeShell.SetParent(_hwnd, 0); } catch { } - Environment.Exit(0); - }); - Console.Error.WriteLine("[embed:trace] EmbedHostWatchdog started"); - } - catch (Exception ex) + VerifyEmbedDpiAwareness(embed.Style); + ApplyEmbedInitialStyles(embed.Style); + _embedWatchdog = new EmbedHostWatchdog(); + _embedWatchdog.Start(embed.HostPid, () => { - Console.Error.WriteLine("[embed:trace] embed setup THREW: " + ex.GetType().FullName + ": " + ex.Message); - Console.Error.WriteLine(ex.ToString()); - throw; - } + try { NativeShell.SetParent(_hwnd, 0); } catch { } + Environment.Exit(0); + }); } // Snapshot initial per-window DPI before applying spec sizing so the diff --git a/tests/stress_perf/ci/README.md b/tests/stress_perf/ci/README.md index 9dce53875..bcdfac974 100644 --- a/tests/stress_perf/ci/README.md +++ b/tests/stress_perf/ci/README.md @@ -234,7 +234,7 @@ default `-Reps 12` (drop to e.g. `-Reps 3` only for a quick smoke run). ## Troubleshooting -- **Run crashes with `0xC000027B` right after "MountAndActivate ok".** That is a +- **Run crashes with `0xC000027B` during first-frame window activation.** That is a stowed XAML/compositor exception. Most often the box cannot composite a real WinUI window (headless server, no GPU/desktop session, or an RDP session without composition) — run from an interactive desktop session. **On an ARM64