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

Closed
opened 2026-11-25 13:00:28 +00:00 by fromthemoonx · 3 comments
fromthemoonx commented 2026-11-25 13:00:28 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T13:00:28Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6605054116 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2298). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T13:00:28Z. --- 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.
oni-swr commented 2026-11-25 14:09:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T13:23:58Z.


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

<!-- greyfinch-sync:ivall/xcl:comment:7163720112 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7163720112). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T13:23:58Z. --- 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).
upipibi commented 2026-11-25 15:08:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T14:52:37Z.


@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.

<!-- greyfinch-sync:ivall/xcl:comment:7165953108 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7165953108). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T14:52:37Z. --- @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.
fromthemoonx commented 2026-11-25 17:07:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-11-25T17:07:23Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7169038045 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2298#issuecomment-7169038045). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-11-25T17:07:23Z. --- 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.
Sign in to join this conversation.
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#2288
No description provided.