Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/skills/perf-compare/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 4 additions & 18 deletions src/Reactor/Hosting/ReactorApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,30 +480,16 @@ internal static ReactorWindow OpenWindowCore(
Action<ReactorHost>? 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);
Comment thread
azchohfi marked this conversation as resolved.
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;
Expand Down
27 changes: 7 additions & 20 deletions src/Reactor/Hosting/ReactorWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }
Comment thread
azchohfi marked this conversation as resolved.
Comment thread
azchohfi marked this conversation as resolved.
Comment thread
azchohfi marked this conversation as resolved.
Environment.Exit(0);
});
}

// Snapshot initial per-window DPI before applying spec sizing so the
Expand Down
2 changes: 1 addition & 1 deletion tests/stress_perf/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading