Menu: use an exclusive RAII temp manifest for the activation context #2273

Open
Decodere wants to merge 1 commit from upstream-pr/2283 into main
Decodere commented 2026-11-25 12:23:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-25T12:23:50Z.


What is in it

Fixes #2272 by hardening and cleaning up the temporary Common Controls 6 activation-context manifest created in crates/xcl/src/main.rs:

  1. Exclusive unique RAII temp manifest (TempManifest): Replaces std::fs::write to the fixed path %TEMP%\xcl-menu.manifest with TempManifest::create_in, which generates unique xcl-menu-<pid>-<seq>.manifest paths and creates them exclusively via OpenOptions::new().write(true).create_new(true).share_mode(0).custom_flags(FILE_FLAG_OPEN_REPARSE_POINT). Colliding files, hard links, symlinks, directories, or junctions (AlreadyExists, or PermissionDenied when symlink_metadata().is_ok()) are skipped without truncating or overwriting existing targets, write/flush errors close the file handle before removing the partial file, and the handle is flushed and closed before calling CreateActCtxW with lossless UTF-16 encoding (OsStrExt::encode_wide).
  2. Immediate manifest cleanup: activate_manifest_in drops TempManifest immediately after CreateActCtxW returns (on both success and failure), so no temporary manifest file stays in %TEMP% while the menu is open or after teardown.
  3. Activation-context and COM lifecycle cleanup: activate_manifest_in calls ReleaseActCtx(h) if ActivateActCtx fails (fixing the handle leak), and Ui records com_init = CoInitializeEx(...) >= 0 so Ui::drop only calls CoUninitialize() when CoInitializeEx actually succeeded (avoiding an unbalanced CoUninitialize() after RPC_E_CHANGED_MODE).

Tested

  • Hardware & toolchain: NVIDIA GeForce RTX 4060 8 GB (driver 621.40, wave32), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17.
  • Rebased onto origin/main (1c8b551475e1e7bfe48f94448492a4c3544a2e0f) at 139a2ef6e3e0bac56a535c069005cc7d7bd17a60:
    • cargo build --workspace (debug): ok.
    • cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2911 passed, 0 failed, 51 ignored (+2 new tests vs origin/main 1c8b5514).
    • Targeted unittests src/main.rs: 3/3 passed (console_tests::the_saved_console_is_the_default_of_the_menu, tests::temp_manifest_skips_collisions_and_removes_on_drop, tests::live_actctx_activates_after_manifest_removal_and_ui_guards_com).
    • SKIPPED lines (28 total, identical to origin/main 1c8b5514): 22 no wave64 (8 direct + 14 lower_dxil subcases), 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode is required).
    • cargo build --release -p xcl: ok.
  • Pre-fix reproduction was also confirmed previously (unmodified Ui::enter() overwrote a pre-existing xcl-menu.manifest sentinel).

Regression run

Paired 60 s retail title runs with scripts/smoke.ps1 (release build, same title 29640639, clean working tree) on origin/main (1c8b551475e1e7bfe48f94448492a4c3544a2e0f) and this PR (139a2ef6e3e0bac56a535c069005cc7d7bd17a60):

Baseline (origin/main):

xcl-smoke v1
commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1462 (PresentX 1462)
presents per 2 s (last 3): 48 53 59
device removals: 0
crashes: 0
peak commit: 16043 MB

PR head (139a2ef6):

xcl-smoke v1
commit: 139a2ef6e3e0bac56a535c069005cc7d7bd17a60
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1601 (PresentX 1601)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15406 MB

Not tested

  • Interactive double-click Explorer launch of the TaskDialog menu UI (activation context creation, activation after file deletion, and STA/MTA COM pairing are exercised directly by the live Windows unit tests).
  • Symlink creation without elevation (hard link and directory collisions are exercised in the unprivileged unit test, and FILE_FLAG_OPEN_REPARSE_POINT prevents reparse-point traversal).
  • AMD/Intel GPUs and D3D12 debug-layer tests (d3d12SDKLayers.dll is not installed on this host).

AI use

Antigravity (Gemini 4 Neon) wrote the fix, tests, rebase onto main, and this PR description; all builds, tests, and paired retail smoke runs were executed locally on the hardware listed above.

Fixes #2272

<!-- greyfinch-sync:ivall/xcl:issue:5491256492 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-25T12:23:50Z. --- **What is in it** Fixes #2272 by hardening and cleaning up the temporary Common Controls 6 activation-context manifest created in `crates/xcl/src/main.rs`: 1. **Exclusive unique RAII temp manifest (`TempManifest`)**: Replaces `std::fs::write` to the fixed path `%TEMP%\xcl-menu.manifest` with `TempManifest::create_in`, which generates unique `xcl-menu-<pid>-<seq>.manifest` paths and creates them exclusively via `OpenOptions::new().write(true).create_new(true).share_mode(0).custom_flags(FILE_FLAG_OPEN_REPARSE_POINT)`. Colliding files, hard links, symlinks, directories, or junctions (`AlreadyExists`, or `PermissionDenied` when `symlink_metadata().is_ok()`) are skipped without truncating or overwriting existing targets, write/flush errors close the file handle before removing the partial file, and the handle is flushed and closed before calling `CreateActCtxW` with lossless UTF-16 encoding (`OsStrExt::encode_wide`). 2. **Immediate manifest cleanup**: `activate_manifest_in` drops `TempManifest` immediately after `CreateActCtxW` returns (on both success and failure), so no temporary manifest file stays in `%TEMP%` while the menu is open or after teardown. 3. **Activation-context and COM lifecycle cleanup**: `activate_manifest_in` calls `ReleaseActCtx(h)` if `ActivateActCtx` fails (fixing the handle leak), and `Ui` records `com_init = CoInitializeEx(...) >= 0` so `Ui::drop` only calls `CoUninitialize()` when `CoInitializeEx` actually succeeded (avoiding an unbalanced `CoUninitialize()` after `RPC_E_CHANGED_MODE`). **Tested** - Hardware & toolchain: NVIDIA GeForce RTX 4060 8 GB (driver `621.40`, wave32), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust `1.100.1` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2602.17`. - Rebased onto `origin/main` (`1c8b551475e1e7bfe48f94448492a4c3544a2e0f`) at `139a2ef6e3e0bac56a535c069005cc7d7bd17a60`: - `cargo build --workspace` (debug): ok. - `cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture` (43 targets): **2911 passed, 0 failed, 51 ignored** (+2 new tests vs `origin/main` `1c8b5514`). - Targeted `unittests src/main.rs`: **3/3 passed** (`console_tests::the_saved_console_is_the_default_of_the_menu`, `tests::temp_manifest_skips_collisions_and_removes_on_drop`, `tests::live_actctx_activates_after_manifest_removal_and_ui_guards_com`). - `SKIPPED` lines (28 total, identical to `origin/main` `1c8b5514`): 22 `no wave64` (8 direct + 14 `lower_dxil` subcases), 2 `no d3d12SDKLayers.dll`, 1 `no D3D12 debug layer`, 2 `no heap windows`, 1 `cannot disable the driver cache (Windows Developer Mode is required)`. - `cargo build --release -p xcl`: ok. - Pre-fix reproduction was also confirmed previously (unmodified `Ui::enter()` overwrote a pre-existing `xcl-menu.manifest` sentinel). **Regression run** Paired 60 s retail title runs with `scripts/smoke.ps1` (release build, same title `29640639`, clean working tree) on `origin/main` (`1c8b551475e1e7bfe48f94448492a4c3544a2e0f`) and this PR (`139a2ef6e3e0bac56a535c069005cc7d7bd17a60`): Baseline (`origin/main`): ``` xcl-smoke v1 commit: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1462 (PresentX 1462) presents per 2 s (last 3): 48 53 59 device removals: 0 crashes: 0 peak commit: 16043 MB ``` PR head (`139a2ef6`): ``` xcl-smoke v1 commit: 139a2ef6e3e0bac56a535c069005cc7d7bd17a60 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1601 (PresentX 1601) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15406 MB ``` **Not tested** - Interactive double-click Explorer launch of the TaskDialog menu UI (activation context creation, activation after file deletion, and STA/MTA COM pairing are exercised directly by the live Windows unit tests). - Symlink creation without elevation (hard link and directory collisions are exercised in the unprivileged unit test, and `FILE_FLAG_OPEN_REPARSE_POINT` prevents reparse-point traversal). - AMD/Intel GPUs and D3D12 debug-layer tests (`d3d12SDKLayers.dll` is not installed on this host). **AI use** Antigravity (Gemini 4 Neon) wrote the fix, tests, rebase onto `main`, and this PR description; all builds, tests, and paired retail smoke runs were executed locally on the hardware listed above. Fixes #2272
jennydeth commented 2026-11-25 15:07:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T14:33:08Z.


NVIDIA run.

Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 0ec32af.

Result: cargo test --workspace -- --test-threads=4: 1252 passed, 0 failed, 46 ignored. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips.

Not tested: opening xcl.exe from Explorer and using the menu by hand.

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7165451702 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7165451702). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-25T14:33:08Z. --- NVIDIA run. Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head 0ec32af. Result: cargo test --workspace -- --test-threads=4: 1252 passed, 0 failed, 46 ignored. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips. Not tested: opening xcl.exe from Explorer and using the menu by hand. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
S1m0ne1997 commented 2026-11-25 15:08:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T15:07:55Z.


Test report for 0ec32afd07a6ce5de24259703cb2e10f983aa372 (this PR's head), for #1607.

Tested

  • NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, rustc 1.100.0 (0ef1bc386 2026-11-09) x86_64-pc-windows-msvc, debug.
  • cargo build --workspace, then cargo test --workspace -- --test-threads=4 at the head: 1252 passed, 0 failed, 46 ignored.
  • SKIPPED (17): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu (no wave64), coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu (no wave64), cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu (no wave64), the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu (no wave64), a_per_lane_2d_or_3d_group_runs_on_the_gpu (no wave64), const_and_null_mask_operands_agree_with_hlsl_on_the_gpu (const_mask, wave64: no wave64), f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)); f16 arithmetic, wave64: no wave64), f32_programs_on_the_gpu (f32 arithmetic, wave64: no wave64; f32 compares, wave64: no wave64), f64_programs_on_the_gpu (f64, wave64: no wave64), integer_programs_on_the_gpu (integer arithmetic, wave64: no wave64; integer carries, wave64: no wave64), mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (mask_ff0_flbit, wave64: no wave64), gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache (Windows Developer Mode is required): L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D)), test_title_draws_with_a_root_signature_under_the_debug_layer (no d3d12SDKLayers.dll), uploads_start_from_each_subresources_state (no D3D12 debug layer (L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D))).

Regression run (retail title, scripts/smoke.ps1 -Seconds 60, release; main built from the commit in its block, this PR from its head with no changes to crates/, both run with the scripts/smoke.ps1 of main, which hashes the name of the game folder)

main:

xcl-smoke v1
commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1599 (PresentX 1599)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16384 MB

this PR:

xcl-smoke v1
commit: 0ec32afd07a6ce5de24259703cb2e10f983aa372
gpu: NVIDIA GeForce RTX 4090
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1632 (PresentX 1632)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17600 MB

Not tested

  • AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only.

AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.

<!-- greyfinch-sync:ivall/xcl:comment:7166352373 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7166352373). Originally posted by [S1m0ne1997](https://github.com/S1m0ne1997) on 2026-11-25T15:07:55Z. --- Test report for `0ec32afd07a6ce5de24259703cb2e10f983aa372` (this PR's head), for #1607. **Tested** - NVIDIA GeForce RTX 4090 24 GB (driver 621.40), AMD Ryzen 9 9950X3D, 47 GB RAM, Windows 11 Home 10.0.26300, `rustc 1.100.0 (0ef1bc386 2026-11-09)` `x86_64-pc-windows-msvc`, debug. - `cargo build --workspace`, then `cargo test --workspace -- --test-threads=4` at the head: **1252 passed, 0 failed, 46 ignored**. - SKIPPED (17): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu` (no wave64), `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu` (no wave64), `a_per_lane_2d_or_3d_group_runs_on_the_gpu` (no wave64), `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` (const_mask, wave64: no wave64), `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)); f16 arithmetic, wave64: no wave64), `f32_programs_on_the_gpu` (f32 arithmetic, wave64: no wave64; f32 compares, wave64: no wave64), `f64_programs_on_the_gpu` (f64, wave64: no wave64), `integer_programs_on_the_gpu` (integer arithmetic, wave64: no wave64; integer carries, wave64: no wave64), `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` (mask_ff0_flbit, wave64: no wave64), `gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache (Windows Developer Mode is required): L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D)), `test_title_draws_with_a_root_signature_under_the_debug_layer` (no d3d12SDKLayers.dll), `uploads_start_from_each_subresources_state` (no D3D12 debug layer (L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D))). **Regression run** (retail title, `scripts/smoke.ps1 -Seconds 60`, release; `main` built from the commit in its block, this PR from its head with no changes to `crates/`, both run with the `scripts/smoke.ps1` of `main`, which hashes the name of the game folder) main: ``` xcl-smoke v1 commit: 06c9f5505f63f10c5ec49ef932d75b2c28177324 gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1599 (PresentX 1599) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16384 MB ``` this PR: ``` xcl-smoke v1 commit: 0ec32afd07a6ce5de24259703cb2e10f983aa372 gpu: NVIDIA GeForce RTX 4090 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1632 (PresentX 1632) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17600 MB ``` **Not tested** - AMD, other NVIDIA cards and drivers, Linux. I did not review the diff; this report is the build, the suite and the regression run only. *AI use: Claude Code with Claude Opus 5.5 ran the build, the suite and the regression run and wrote this report at my request.*
DavidM1911 commented 2026-11-25 18:04:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T17:17:31Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7169287195 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7169287195). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T17:17:31Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
raylitebull commented 2026-11-25 19:09:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T18:28:40Z.


Code review on 0ec32af (crates/xcl/src/menu.rs): clean RAII TempManifest with create_new(true) atomic/process+counter naming and drop cleanup, and CI is green.

Remaining before merge: An AMD verification pass on 0ec32af (RTX 4090 + RTX 3060 Ti passed).

<!-- greyfinch-sync:ivall/xcl:comment:7170960829 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7170960829). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T18:28:40Z. --- Code review on `0ec32af` (`crates/xcl/src/menu.rs`): clean RAII `TempManifest` with `create_new(true)` atomic/process+counter naming and drop cleanup, and CI is green. **Remaining before merge:** An **AMD** verification pass on `0ec32af` (RTX 4090 + RTX 3060 Ti passed).
throny commented 2026-11-28 16:26:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:26:39Z.


merge-check claim
head: 0ec32afd07

<!-- greyfinch-sync:ivall/xcl:comment:7242247314 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7242247314). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:26:39Z. --- merge-check claim head: 0ec32afd07a6ce5de24259703cb2e10f983aa372
throny commented 2026-11-28 16:48:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-28T16:48:36Z.


merge-check
base: db3921dc
head: 0ec32afd07
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2147 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored.
review: no blocking finding; all hunks read. The manifest file is written, flushed and closed before the activation context is created from it, and it is deleted on every path. Two things main does wrong are fixed on the way: an activation context that could not be activated was leaked, and COM was uninitialised even when its initialisation had been refused. When the temp folder cannot be written the menu falls back to the old look, as on main. Minor: the fixed-name manifest earlier versions left in the temp folder is not cleaned up. The AMD run asked for in the thread is still open, but this code has no GPU path.
performance: none.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).

<!-- greyfinch-sync:ivall/xcl:comment:7242529639 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7242529639). Originally posted by [throny](https://github.com/throny) on 2026-11-28T16:48:36Z. --- merge-check base: db3921dc head: 0ec32afd07a6ce5de24259703cb2e10f983aa372 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2147 passed, 0 failed, 48 ignored (26 SKIPPED lines). Base alone at db3921dc: 2145 passed, 0 failed, 48 ignored. review: no blocking finding; all hunks read. The manifest file is written, flushed and closed before the activation context is created from it, and it is deleted on every path. Two things main does wrong are fixed on the way: an activation context that could not be activated was leaked, and COM was uninitialised even when its initialisation had been refused. When the temp folder cannot be written the menu falls back to the old look, as on main. Minor: the fixed-name manifest earlier versions left in the temp folder is not cleaned up. The AMD run asked for in the thread is still open, but this code has no GPU path. performance: none. verdict: safe to merge hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Foniass commented 2026-12-01 07:44:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:44:34Z.


Triage (#1607) – head 0ec32af

No open or merged PR makes the same change (issue #2272). Main's Ui::enter still writes xcl-menu.manifest to a fixed name in %TEMP% and never deletes it. The new TempManifest creates the file with create_new and FILE_FLAG_OPEN_REPARSE_POINT, deletes it after CreateActCtxW returns, and calls CoUninitialize only when CoInitializeEx succeeded. That fixes the existing unbalanced call after RPC_E_CHANGED_MODE, but it is a second change in a PR about the manifest. The PR conflicts with main.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7304425049 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7304425049). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:44:34Z. --- **Triage (#1607)** – head 0ec32af No open or merged PR makes the same change (issue #2272). Main's `Ui::enter` still writes `xcl-menu.manifest` to a fixed name in %TEMP% and never deletes it. The new `TempManifest` creates the file with `create_new` and `FILE_FLAG_OPEN_REPARSE_POINT`, deletes it after `CreateActCtxW` returns, and calls `CoUninitialize` only when `CoInitializeEx` succeeded. That fixes the existing unbalanced call after `RPC_E_CHANGED_MODE`, but it is a second change in a PR about the manifest. The PR conflicts with main. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Foniass commented 2026-12-02 14:40:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:40:01Z.


Follow-up review (head 139a2ef6, since 0ec32af, diff read, not a merge-check):

  • Earlier points: unchanged; this push only rebases onto the current main (the own change is the same apart from context and commit-message wrapping).

New: none.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7348933450 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7348933450). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T14:40:01Z. --- Follow-up review (head 139a2ef6, since 0ec32af, diff read, not a merge-check): - **Earlier points:** unchanged; this push only rebases onto the current `main` (the own change is the same apart from context and commit-message wrapping). New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
ClosetPie107 commented 2026-12-02 17:13:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-12-02T17:13:07Z.


Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on 139a2ef

Merged onto main 5eaadb54 (clean merge) and compared with main run twice on the same machine.

Setup

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7)
  • Wine 11.23 (system), stock vkd3d-proton v3.1-83-gcae8353ed and DXVK dxgi.dll from GE-Proton11-16, DXC 1.9.2609.5
  • Debug build, cross-compiled for x86_64-pc-windows-msvc with cargo-xwin; test binaries run under Wine

Tested: cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>

passed failed ignored
main 5eaadb54 2769 177 52
this PR merged 2771 177 52
  • Tests that fail with this PR and pass on main: none.
  • Tests this PR adds: 2 of 2 pass (temp_manifest_skips_collisions_and_removes_on_drop, live_actctx_activates_after_manifest_removal_and_ui_guards_com).
About the failures on main and the 31 skipped tests (same for every PR in this batch)
  • Most of main's 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (d3d12_command_list_Reset: Invalid command allocator), and later tests get E_INVALIDARG (0x80070057). Running vkd3d-proton master with its vtable check taken out, hle::d3d12x::sparse::tests goes from 106 passed / 38 failed to 144 / 0.
  • The 31 skipped tests make vkd3d-proton's dxil-spirv call std::terminate() (Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, gpu_compute_mode_dispatch_abi, gpu_compute_thread_limits_leave_the_lanes_past_them_out, the two gpu_mesh_mode_* tests, and console_wave64_compute_through_the_pso_hook_dispatch_and_read_back, plus serialize_root_signature_strips_console_flags_and_preserves_pc_flags, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (f8c1cae8, dxil-spirv 93ab44c5).
  • main was run twice: same counts, same failure set. SKIPPED lines (same as main): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1).

Not tested: Windows, NVIDIA, a retail title / scripts/smoke.ps1, a review of the diff. This is a test report, not a merge-check.

AI use: omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with main, and drafted this report. The user asked for it to be posted.

<!-- greyfinch-sync:ivall/xcl:comment:7353061679 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2283#issuecomment-7353061679). Originally posted by [ClosetPie107](https://github.com/ClosetPie107) on 2026-12-02T17:13:07Z. --- **Linux / AMD RDNA4 (RADV, Wine + vkd3d-proton): full test suite on `139a2ef`** Merged onto `main` `5eaadb54` (clean merge) and compared with `main` run twice on the same machine. **Setup** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1), Ryzen 5 9600X, 30 GiB RAM, CachyOS (kernel 7.3.7) - Wine 11.23 (system), stock vkd3d-proton `v3.1-83-gcae8353ed` and DXVK `dxgi.dll` from GE-Proton11-16, DXC 1.9.2609.5 - Debug build, cross-compiled for `x86_64-pc-windows-msvc` with `cargo-xwin`; test binaries run under Wine **Tested:** `cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 --skip <31 tests>` | | passed | failed | ignored | |---|---|---|---| | `main` `5eaadb54` | 2769 | 177 | 52 | | this PR merged | 2771 | 177 | 52 | - **Tests that fail with this PR and pass on `main`:** none. - **Tests this PR adds:** 2 of 2 pass (`temp_manifest_skips_collisions_and_removes_on_drop`, `live_actctx_activates_after_manifest_removal_and_ui_guards_com`). <details><summary>About the failures on <code>main</code> and the 31 skipped tests (same for every PR in this batch)</summary> - Most of `main`'s 177 failures under Wine come from #175: once a test has set up the real device, vkd3d-proton refuses the command allocators XCL adopts (`d3d12_command_list_Reset: Invalid command allocator`), and later tests get `E_INVALIDARG` (`0x80070057`). Running vkd3d-proton master with its vtable check taken out, `hle::d3d12x::sparse::tests` goes from 106 passed / 38 failed to 144 / 0. - The 31 skipped tests make vkd3d-proton's dxil-spirv call `std::terminate()` (`Cannot reliably convert LLVM pointer type, we cannot differentiate between Function and Private`), which kills the whole test binary. They are the split-wave64, dispatch-chain and bridged-mask GPU tests, `gpu_compute_mode_dispatch_abi`, `gpu_compute_thread_limits_leave_the_lanes_past_them_out`, the two `gpu_mesh_mode_*` tests, and `console_wave64_compute_through_the_pso_hook_dispatch_and_read_back`, plus `serialize_root_signature_strips_console_flags_and_preserves_pc_flags`, whose null descriptor vkd3d-proton dereferences. The dxil-spirv ones crash the same way with vkd3d-proton master (`f8c1cae8`, dxil-spirv `93ab44c5`). - `main` was run twice: same counts, same failure set. `SKIPPED` lines (same as `main`): no heap windows (2), no D3D12 debug layer (2-3), driver cache control not implemented in vkd3d-proton (1). </details> **Not tested:** Windows, NVIDIA, a retail title / `scripts/smoke.ps1`, a review of the diff. This is a test report, not a `merge-check`. **AI use:** omp (Claude Opus 5.5) merged, built and ran the suites on this machine, compared the results with `main`, and drafted this report. The user asked for it to be posted.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2283:upstream-pr/2283'
git switch 'upstream-pr/2283'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2283'
git switch 'upstream-pr/2283'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2283'
git switch 'upstream-pr/2283'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2283'
git switch 'main'
git merge --squash 'upstream-pr/2283'
git switch 'main'
git merge --ff-only 'upstream-pr/2283'
git switch 'main'
git merge 'upstream-pr/2283'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2273
No description provided.