e2e: XCL_DRED=1 with the debug layer crashes the test title in D3D12Core.dll (null read) #2298

Closed
opened 2026-11-26 05:26:12 +00:00 by github-bot · 3 comments
Owner

@⁠fromthemoonx on GitHub · 2026-11-25 13:00 UTC · original

With both XCL_DRED=1 and the D3D12 debug layer on, the test title crashes in D3D12Core.dll with a null read, and test_title_draws_with_a_root_signature_under_the_debug_layer fails. Either one alone is fine.

Repro (main 1a0bbe3, also 6e1e2be; Graphics Tools installed):

XCL_DRED=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer

The test turns the debug layer on itself (XCL_D3D12_DEBUG=1 for the xcl run it starts). It failed 3 of 3 times here, at e2e.rs:293, with exit code Some(-1073741819) (0xC0000005). In the same tree:

result
that test without XCL_DRED passes
XCL_DRED=1 + test_title_runs_and_game_folder_is_untouched (no debug layer) passes
XCL_DRED=1 + the debug-layer test fails 3 of 3

The title's last lines are [PASS] D3D12.X: shaders captured; console shader gets a fallback PSO and [PASS] D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO. Then XCL logs:

xcl: unhandled exception 0xc0000005 in D3D12Core.dll+0x606fb (read at address 0x0) rax=0x7fff41ae06f0 rbx=0x2cff040 rcx=0x0 rdx=0x4a70b120 rsi=0x0 rdi=0x0 …
xcl: process ends with status 0xc0000005 (thread 30596); on the stack: xcl_testtitle.exe+0x43230, xcl_testtitle.exe+0x43230, xcl_testtitle.exe+0xb6670, xcl_testtitle.exe+0x43729, …

So the step after the retail-format shader check, with DRED's auto-breadcrumbs and page-fault reporting set up in real::init (XCL_DRED) and the debug layer both active, hands D3D12Core something null. I have not narrowed down which call it is.

Found while testing #2131, which only changes what DRED prints after a removal. The same failure happens on main, so it is not that PR.

Hardware: RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug.

Not tested: AMD / Intel, a release build, a title.

AI use: Claude Code (Claude Opus 5.5) ran the repro and wrote this issue.

**@⁠fromthemoonx** on GitHub · 2026-11-25 13:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/2298) With both `XCL_DRED=1` and the D3D12 debug layer on, the test title crashes in `D3D12Core.dll` with a null read, and `test_title_draws_with_a_root_signature_under_the_debug_layer` fails. Either one alone is fine. **Repro** (main `1a0bbe3`, also `6e1e2be`; Graphics Tools installed): ``` XCL_DRED=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer ``` The test turns the debug layer on itself (`XCL_D3D12_DEBUG=1` for the `xcl run` it starts). It failed 3 of 3 times here, at `e2e.rs:293`, with `exit code Some(-1073741819)` (`0xC0000005`). In the same tree: | | result | |---|---| | that test without `XCL_DRED` | passes | | `XCL_DRED=1` + `test_title_runs_and_game_folder_is_untouched` (no debug layer) | passes | | `XCL_DRED=1` + the debug-layer test | fails 3 of 3 | The title's last lines are `[PASS] D3D12.X: shaders captured; console shader gets a fallback PSO` and `[PASS] D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO`. Then XCL logs: ``` xcl: unhandled exception 0xc0000005 in D3D12Core.dll+0x606fb (read at address 0x0) rax=0x7fff41ae06f0 rbx=0x2cff040 rcx=0x0 rdx=0x4a70b120 rsi=0x0 rdi=0x0 … xcl: process ends with status 0xc0000005 (thread 30596); on the stack: xcl_testtitle.exe+0x43230, xcl_testtitle.exe+0x43230, xcl_testtitle.exe+0xb6670, xcl_testtitle.exe+0x43729, … ``` So the step after the retail-format shader check, with DRED's auto-breadcrumbs and page-fault reporting set up in `real::init` (`XCL_DRED`) and the debug layer both active, hands D3D12Core something null. I have not narrowed down which call it is. Found while testing #2131, which only changes what DRED prints after a removal. The same failure happens on `main`, so it is not that PR. **Hardware:** RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. **Not tested:** AMD / Intel, a release build, a title. **AI use:** Claude Code (Claude Opus 5.5) ran the repro and wrote this issue.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:26:12 +00:00
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 13:23 UTC · original

Taking #2298: investigating why XCL_DRED=1 combined with the D3D12 debug layer hits a null read in D3D12Core.dll during test_title_draws_with_a_root_signature_under_the_debug_layer, and preparing a minimal fix + regression test on Windows/RX 7800 XT once our GPU test slot is free.

AI use: Claude Code (Claude Sonnet 5.5).

**@⁠oni-swr** on GitHub · 2026-11-25 13:23 UTC · [original](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7163720112) Taking #2298: investigating why `XCL_DRED=1` combined with the D3D12 debug layer hits a null read in `D3D12Core.dll` during `test_title_draws_with_a_root_signature_under_the_debug_layer`, and preparing a minimal fix + regression test on Windows/RX 7800 XT once our GPU test slot is free. AI use: Claude Code (Claude Sonnet 5.5).
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 14:52 UTC · original

@⁠oni-swr A data point for your investigation: it reproduces on NVIDIA too. RTX 3070, driver 616.56, Windows 11 (26100), Graphics Tools installed. The system D3D12Core.dll and d3d12SDKLayers.dll are both 10.0.26100.9549; no Agility SDK is loaded. Tree: the report's main 1a0bbe3a, not the current main.

cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer result
with XCL_DRED=1, 3 runs fails 3 of 3, 0xc0000005 in D3D12Core.dll+0x53b3b, read at address 0x0
without XCL_DRED, 1 run passes

None of the runs skipped. The test title's last line before the crash is the same as in the report: [PASS] D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO. As in the report, rcx and rsi are 0. The offset differs from the report's +0x606fb, probably because of a different D3D12Core.dll build. That's a guess.

AI-assisted (Claude Code). Synthetic test title only.

**@⁠upipibi** on GitHub · 2026-11-25 14:52 UTC · [original](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7165953108) @⁠oni-swr A data point for your investigation: it reproduces on NVIDIA too. RTX 3070, driver 616.56, Windows 11 (26100), Graphics Tools installed. The system `D3D12Core.dll` and `d3d12SDKLayers.dll` are both 10.0.26100.9549; no Agility SDK is loaded. Tree: the report's `main` `1a0bbe3a`, not the current `main`. | `cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer` | result | |---|---| | with `XCL_DRED=1`, 3 runs | fails 3 of 3, `0xc0000005` in `D3D12Core.dll+0x53b3b`, read at address 0x0 | | without `XCL_DRED`, 1 run | passes | None of the runs skipped. The test title's last line before the crash is the same as in the report: `[PASS] D3D12.X: retail-format console shader (XDAT/XBCH/FSSM) captured + fallback PSO`. As in the report, `rcx` and `rsi` are 0. The offset differs from the report's `+0x606fb`, probably because of a different `D3D12Core.dll` build. That's a guess. AI-assisted (Claude Code). Synthetic test title only.
Author
Owner

@⁠fromthemoonx on GitHub · 2026-11-25 17:07 UTC · original

Confirmed fixed here: on main 68a284a (with #2319), XCL_DRED=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer passes 3 of 3 on the same RTX 3060 (driver 610.88) where it failed 3 of 3 before. Thanks @⁠oni-swr.

AI use: Claude Code (Claude Opus 5.5) ran the check.

**@⁠fromthemoonx** on GitHub · 2026-11-25 17:07 UTC · [original](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7169038045) Confirmed fixed here: on `main` `68a284a` (with #2319), `XCL_DRED=1 cargo test -p xcl --test e2e test_title_draws_with_a_root_signature_under_the_debug_layer` passes 3 of 3 on the same RTX 3060 (driver 610.88) where it failed 3 of 3 before. Thanks @⁠oni-swr. AI use: Claude Code (Claude Opus 5.5) ran the check.
This discussion has been locked. Commenting is limited to contributors.
No description provided.