Skip to content

xcl do not use provided D3D12Core.dll, VSH issue #595

Backlog

Description

@Ekibunnel

Game and package version

What happens

Window open for a few seconds and close.
title says : compiling shaders : 0, 1212 pipelines queued, 3 failed

XCL version

508a0c7

GPU and driver version

NVIDIA GeForce RTX 5080, 32.0.16.2101

Windows version

Windows 10 22H2 (19045.7807), D3D12 Agility SDK is next to xcl.exe (D3D12Core.dll 1.620.2.0)

report.json and xcl.log

report.json
xcl.log

Console output

Game exited with code 0xc0000005 (3221225477)
CRASH: unhandled exception 0xc0000005 in game_scarlett_master.exe+0xb5a5f8 (read at address 0x68) rax=0x0 rbx=0x3 rcx=0x0 rdx=0x0 rsi=0x1dc67fecc8 rdi=0x1dc67fed70 rbp=0x13f r8=0xffffffff00000000 r9=0xffffffff00000000 r10=0x1471c2050 r11=0x70403e9f0 (vtable game_scarlett_master.exe+0x61eced8) r12=0x70403e648 r13=0x0 r14=0x0 r15=0x651e95c4d06fbfb1 rsp=0x1dc67fec00; on the stack: game_scarlett_master.exe+0x18194c7, game_scarlett_master.exe+0x75b30f8, game_scarlett_master.exe+0x5bb7cce, game_scarlett_master.exe+0x4fac3d7, game_scarlett_master.exe+0x12b95ab, game_scarlett_master.exe+0x4fac3d7
Imports: 1186 (game-dll:amd_fidelityfx_loader_xbox.dll: 4, game-dll:bink2scarlett.dll: 23, game-dll:libhttpclient.gdk.dll: 38, game-dll:msvcp140.dll: 157, game-dll:vcruntime140.dll: 82, game-dll:vcruntime140_1.dll: 4, game-dll:xboxbvhbuilder.dll: 7, hle-cross:kernelx.dll: 14, hle:acphal.dll: 19, hle:d3d12_xs.dll: 4, hle:gameinput.dll: 1, hle:kernelx.dll: 56, hle:minuserx.dll: 2, hle:xaudio2_9.dll: 1, hle:xcrdapi.dll: 1, hle:xg_xs.dll: 2, stub: 1, system: 770)
Unimplemented functions called (9):
       143×  d3d12_xs.dll!ID3D12CommandAllocator::#9 (not on PC)   (first call: game_scarlett_master.exe+0x188501)
       142×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#126 (not on PC)   (first call: game_scarlett_master.exe+0x3263e)
       142×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#142 (not on PC)   (first call: game_scarlett_master.exe+0x329e9)
       142×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#75 (console extension)   (first call: game_scarlett_master.exe+0x32820)
        13×  d3d12_xs.dll!ID3D12CommandQueue::#31 (newer layout)   (first call: 0x0)
         4×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#131 (not on PC)   (first call: game_scarlett_master.exe+0x2478cba)
         4×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#132 (not on PC)   (first call: game_scarlett_master.exe+0x2478c99)
         2×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#131 (not on PC)   (first call: game_scarlett_master.exe+0x2478bc5)
         1×  d3d12_xs.dll!ID3D12GraphicsCommandList6::#132 (not on PC)   (first call: game_scarlett_master.exe+0x2478ba4)
Report: C:\Users\Eki\AppData\Local\XCL\<package id>\logs\report.json
Log:    C:\Users\Eki\AppData\Local\XCL\<package id>\logs\xcl.log

Activity

  1. added
    bug
    on Nov 24, 2026
  2. pickles976 commented on Nov 24, 2026

    @pickles976

    Static analysis of the crash from a byte-verified copy of the same binary (SHA-256 e95020b2fa4a721db3df59fdecf75621730ac559d8835252f6c3b658d5a08993 = the hash in the leak announcement; not acquired or run by me, disassembly below is local, offline). All RVAs are exe+.

    1. Fault semantics — null vptr, not null object.
    The faulting function starts at 0xb5a5d0 (unwind record 0xb5a5d0..0xb5aa54):

    mov  rax, [rcx]        ; vptr            -> rax = 0  (faulting read source)
    mov  rsi, rcx          ; object ptr kept valid (these two loads succeeded)
    mov  rcx, [rcx+8]      ; -> rcx = 0      (matches dump rcx=0)
    movabs r15, 0x651e95c4d06fbfb1
    mov  r14, [rax+0x68]   ; vtable slot 13  -> read at 0x68, 0xc0000005
    

    The object slot is a valid pointer to zero-initialized memory — never constructed — being dispatched as if live. 0x651e95c4d06fbfb1 is a compiler-issued type-hash immediate (334 occurrences across .text); this call site's tag class is the one whose vtable exe+0x61eced8 your tagger already printed for r11.

    2. Reachable via a thin wrapper from a subsystem-init loop.
    Frame exe+0x5bb7cce is exactly the return site of call 0xb5a490 = xor edx,edx; jmp 0xb5a5d0. Its caller (unwind 0x5bb7b40..0x5bb830d) is a bring-up loop that registers a family of subsystems: per entry it extracts a 9-bit feature field (bextr ctrl 0x90f = bits 15..23) from a config table addressed through [obj+0x650] → [+0xc68]/[+0xc78], allocates via a factory thunk, and stores handles at fixed slots ([rsi+r14*8+0x188/0x1a8/0x1c8/0x1e8]). The factory at 0x1819530 is: operator new(0x158) → store vtable &0x61eced8 → copy fields — so the crashed object was expected to come from exactly this factory, and instead came back as zeroed memory.

    3. The stack line has one bogus frame. exe+0x75b30f8 lands in .data (mid-image), it is stale stack residue, not a return address. Real chain is 4 frames. Worth filtering candidates by section in the walker.

    4. Loader-side observation that may matter more than the crash. Across all 100 MB of .text there is not one RIP-relative reference (no FF 15 /FF 25, no mov reg,[rip+…]) to any of the 587 static import-directory slots — including kernel32 and the Xbox DLLs. All 275 import-style thunks are FF 25 jmp [rip+…] into a table in .rdata (≈0x6794xxx) whose static contents are self-referential RVAs (e.g. slot 0x6794620, 40 callers, content 0x67982b8), i.e. the binary carries a custom link-time call table (.xbld section era linker pass, likely populated at startup by the game itself). If so, a compatibility layer that binds only the PE import directory binds slots the game never reads — which would make the per-DLL Imports: accounting a directory dump, not observed traffic. A cheap discriminator on your next run: log inside one implemented HLE function (e.g. an acphal entry) — if it never fires while the game still runs 2 s, bindings are going somewhere the game doesn't use, and the zero-vtable object in (1) plausibly comes from a code path that never consulted the shim at all.

    5. Ranked causes for the zeroed object (all consistent with (1)): constructor skipped on an error path the console never takes (config bit 23.. field unset because a settings query returned success-but-zero), or an auto-stubbed API with a void**/object out-param that returned S_OK without writing — your report.json → called_stubs should list exactly which stubs ran before the crash; the object's type is the class of vtable 0x61eced8, so a content-tag at allocation time (you already tag it at read time) pins the producer.

    Happy to decode further frames locally — the unwind tables are intact (248 k functions in .pdata) and I can resolve any exe+0x… from a crash report to its function bounds, wrapper chain, and type-hash tag offline.

  3. Ekibunnel commented on Nov 24, 2026

    @Ekibunnel
    Author

    I had the same issue on VIctory.
    And this PR Marvisak/VIctory#175 did fix the issue.

  4. pickles976 commented on Nov 24, 2026

    @pickles976

    Careful with this one — I checked the linked PR, and it isn't this issue's mechanism.

    VIctory's #175 loads the D3D12 Agility SDK runtime on Windows 10 so shader-model 6.6 compiles exist. That addresses a capability failure: D3DCompile rejecting SM 6.6 → HR errors from shader-creation calls, no AV, no null object. This issue's crash is the zero object: a success-returning factory handing back an all-zero object whose vtable load (mov rax,[obj]; call [rax+off]) faults — the chain is auth failure → uninitialized subsystem (#598) → the site decoded at game+0xb5a5f8.

    The discriminator is one line in any dump: a fault in the title's code at +0xb5a5f8 reading a vtable off a zeroed object = this issue; a shader-compile HRESULT error (or a fault inside dxcompiler.dll) = the Agility-class problem. A run that still shows the +0xb5a5f8 read won't be moved by an Agility-SDK loader, in either project.

    Worth noting for the ecosystem generally (day 1 has produced two large independent projects attempting this): fixes don't transfer by symptom name, only by faulting site. Both codebases are seeing the same title, so the sites are common ground — worth citing them in each other's issues.

  5. Ekibunnel commented on Nov 24, 2026

    @Ekibunnel
    Author

    What I meant was : it is an issue with using the right D3D12Core.dll

    It is said in the README.md and in HANDOFF.md that Microsoft D3D12 Agility SDK is loaded from : %XCL_D3D12_DIR% (only it, when set),
    <xcl.exe dir>\D3D12, <xcl.exe dir>, %LOCALAPPDATA%\XCL\D3D12

    But I did test it and it does not work for most of them, the only path that work is %LOCALAPPDATA%\XCL\D3D12.

    If you put D3D12Core.dll inside <xcl.exe dir>\D3D12 or <xcl.exe dir> it does not work.
    Using %XCL_D3D12_DIR% will not work no matter where it point to.

  6. changed the title [-]Crash after 2 secs ( unhandled exception 0xc0000005 in game_scarlett_master.exe+0xb5a5f8 )[/-] [+] xcl do not use provided D3D12Core.dll, Crash after 2 secs ( unhandled exception 0xc0000005 in game_scarlett_master.exe+0xb5a5f8 )[/+] on Nov 24, 2026
  7. pickles976 commented on Nov 24, 2026

    @pickles976

    Static read of the loader against your result — the search list is not the bug, and that narrows it usefully:

    1. candidates() (crates/xcl/src/gpu/agility.rs:50) returns env-first exactly as documented, and it is unit-tested for that order (agility_tests.rs:105). So your observation lives downstream of directory selection: either probe_dir (needs D3D12Core.dll directly in the folder) or activation (CreateDeviceFactory).
    2. The env override short-circuits on purpose (agility.rs:55: "do not silently fall through"): set XCL_D3D12_DIR and a wrong folder is a hard Unavailable — no fallback to the others. The most common wrong folder is the extracted NuGet root: the DLL actually lives in bin\x64\. The README line ("point %XCL_D3D12_DIR% at it") doesn't say which folder, and that ambiguity is a real docs bug — proposing a clarification separately.
    3. Every rejection path produces a typed reason string ("{XCL_D3D12_DIR}=… has no D3D12Core.dll", probe errors prefixed with the full DLL path, activation errors verbatim from Win32). If you paste the reason line xcl logged (it reports the Agility decision at startup), we can name which stage killed the exe-dir attempts — one candidate worth testing while you're at it: paths with non-ASCII characters fail the ANSI encoding step (encode_wide_for_code_page), while %LOCALAPPDATA% is usually pure ASCII — an exe dir like C:\Users\Sebastián\… or any umlaut explains "only LOCALAPPDATA works" exactly.
  8. Ekibunnel commented on Nov 24, 2026

    @Ekibunnel
    Author

    If I set the folder on the my S: drive it doesn't work

    [    0.226][ 9540][WARN ] D3D12: Agility SDK unavailable (XCL_D3D12_DIR=S:\GTA6\XCL_INDEV\xcl_main\D3D12 has no D3D12Core.dll) – using inbox D3D12
    

    It also does not work if I try on my G: or D: drive (even tho the path here is very small and pure ASCII)

    [    0.224][ 5064][WARN ] D3D12: Agility SDK unavailable (XCL_D3D12_DIR=G:\D3D12 has no D3D12Core.dll) – using inbox D3D12
    
    [    0.227][16240][WARN ] D3D12: Agility SDK unavailable (XCL_D3D12_DIR=D:\D3D12 has no D3D12Core.dll) – using inbox D3D12
    

    But it does work if the folder is on my C: or R: drive

    [    0.224][15384][INFO ] D3D12: Agility SDK v620 (C:\D3D12)
    
    [    0.228][12708][INFO ] D3D12: Agility SDK v620 (R:\D3D12)
    
  9. Ekibunnel commented on Nov 24, 2026

    @Ekibunnel
    Author

    The folder is being translated by XCL's virtual file system before it is probed

    XCL use GAME:, G: {game}, D: {game}, T: {data}\temp, S: {data}\pls
    And my main drives are S:, G:, D: that why I have issues

  10. changed the title [-] xcl do not use provided D3D12Core.dll, Crash after 2 secs ( unhandled exception 0xc0000005 in game_scarlett_master.exe+0xb5a5f8 )[/-] [+] xcl do not use provided D3D12Core.dll, VSH issue[/+] on Nov 24, 2026
  11. vakaobr commented on Nov 24, 2026

    @vakaobr

    @Ekibunnel's diagnosis is right: the Agility SDK probe reads <dir>\D3D12Core.dll after the VFS hooks are in, so on a drive letter a console mount names (G:, D:, S:) the read lands in the game folder. #1136 registers each candidate's D3D12Core.dll as one of XCL's own paths before the hooks go in, the mechanism #49 and #331 use for the game folder and the shader cache. It covers XCL_D3D12_DIR, <exe dir>\D3D12 and <exe dir>, and it registers the files rather than the folders, so an xcl.exe at a drive root doesn't take the whole drive from the console mount.

    AI use: Claude Code, Claude Opus 5.5 wrote this note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions