Skip to content

Unhandled xgameruntime exception #1302

Backlog

Description

@Itsig0

Game and package version

Retail Game 1.0.2.1

What happens

The window opens but it promptly crashes while trying to render the first frames.

XCL version

930e8b4

GPU and driver version

NVIDIA GeForce RTX 4080, 621.14

Windows version

Windows 11 26H2 (26300.9974)

report.json and xcl.log

xcl.log
report.json

Console output

XCL 0.1.0 – starting '<package id>'
  exe:   H:\xmas\game_scarlett_master.exe
  data:  D:\Users\pasca\AppData\Local\XCL\<package id>
  MicrosoftGame.Config: title memory Advanced, PLS 2048 MB, TitleId 7952987A
  console: imports d3d12_xs.dll
xcl: DXC: dxcompiler 1.9.2609.5 (01b62ad4), dxil 1.9.2609.5, from D:\Users\pasca\AppData\Local\XCL\D3D12\
  GPU: NVIDIA GeForce RTX 4080 (16048 MiB VRAM)
  NOTE: waves of 32–32 lanes: the console's 64-lane programs run as two 32-lane halves (slower; vertex / pixel shaders that read lanes 32–63 can differ)
  DXC 1.9.2609.5 (01b62ad4): D:\Users\pasca\AppData\Local\XCL\D3D12\

Game exited with code 0xc0000005 (3221225477)
CRASH: unhandled exception 0xc0000005 in xgameruntime.dll+0x1098ce (read at address 0x0) rax=0x0 rbx=0x0 rcx=0x0 rdx=0x0 rsi=0x597e660 rdi=0x0 rbp=0x0 r8=0x597e660 r9=0x597e660 r10=0x9c0000 r11=0xbd35f8d0 r12=0x0 r13=0x0 r14=0x707cddc40 (vtable game_scarlett_master.exe+0x6187d60) r15=0x0 rsp=0x597e580 (vtable game_scarlett_master.exe+0x5f41040); on the stack: game_scarlett_master.exe+0x5f41040, game_scarlett_master.exe+0x5f41040, xgameruntime.dll+0x10e5a7, game_scarlett_master.exe+0x55de08c, game_scarlett_master.exe+0x55de08c, ucrtbase.dll+0x50d9
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):
        16×  d3d12_xs.dll!ID3D12CommandAllocator::#9 (not on PC)   (first call: game_scarlett_master.exe+0x188501)
        15×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#126 (not on PC)   (first call: game_scarlett_master.exe+0x3263e)
        15×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#142 (not on PC)   (first call: game_scarlett_master.exe+0x329e9)
        15×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#75 (console extension)   (first call: game_scarlett_master.exe+0x32820)
         4×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#131 (not on PC)   (first call: game_scarlett_master.exe+0x2478cba)
         4×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#132 (not on PC)   (first call: game_scarlett_master.exe+0x2478c99)
         2×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#131 (not on PC)   (first call: game_scarlett_master.exe+0x2478bc5)
         1×  d3d12_xs.dll!ID3D12GraphicsCommandList10::#132 (not on PC)   (first call: game_scarlett_master.exe+0x2478ba4)
         1×  d3d12_xs.dll!ID3D12CommandQueue::#31 (newer layout)   (first call: 0x0)
Unmapped console paths: 2
  C:\Program Files (x86)\Windows Kits\10\bin\*
  C:\Program Files\Windows Kits\10\bin\*

Activity

  1. added
    bug
    on Nov 24, 2026
  2. Key-rs commented on Nov 24, 2026

    @Key-rs

    Same fault, reproduced on a second machine — plus the failure chain that precedes it

    This is the identical crash signature (same offsets for the vtable/stack frames, same xgameruntime.dll+0x1098ce), so it is one deterministic fault and not machine-specific. What may help is the sequence before the null read, which the report above does not show.

    Environment

    XCL main @ 47efa2e (2026-11-24 10:24), cargo build --release, rustc 1.99.1
    GPU NVIDIA GeForce RTX 4060 Laptop GPU, 7956 MiB VRAM, driver 32.0.16.2124
    DXC 1.8.2502.11 (dxcompiler.dll + dxil.dll), from D:\Windows Kits\10\bin\10.0.26100.0\x64 via XCL_DXC_DIR
    OS Windows 11 10.0.26300
    Package retail 1.0.2.1, TitleId 7952987A, game_scarlett_master.exe
    Adapter picked via per-app preference; the log confirms D3D12.X: backend 'real' – NVIDIA GeForce RTX 4060 Laptop GPU (7956 MiB VRAM)

    Crash

    Game exited with code 0xc0000005 (3221225477)
    CRASH: unhandled exception 0xc0000005 in xgameruntime.dll+0x1098ce (read at address 0x0)
      rax=0x0 rbx=0x0 rcx=0x0 rdx=0x0 rsi=0x...  rdi=0x0 rbp=0x0
      r14=0x... (vtable game_scarlett_master.exe+0x6187d60)
      rsp=0x... (vtable game_scarlett_master.exe+0x5f41040)
      on the stack: +0x5f41040, +0x5f41040, xgameruntime.dll+0x10e5a7, +0x55de08c, +0x55de08c, ucrtbase.dll+0x50d9
    

    0x6187d60, 0x5f41040, 0x55de08c and xgameruntime.dll+0x10e5a7 all match the report above exactly.

    What happens immediately before the fault

    With XCL_CONSOLE_LISTS=1 and XCL_LIST_TRACE=1:

    xcl: console list: unknown record 0xc000b600 (word 27) – rest skipped
    xcl: D3D12.X: command list 0x2ec53b0 (type 0) Close → 0x80004005
    xcl: console list: Close – Close: 0x80004005 (E_FAIL)
    xcl: console list: unknown record 0xc000b600 (word 20) – rest skipped
    xcl: D3D12.X: command list 0x2ec2390 (type 0) Close → 0x80004005
    xcl: console list: Close – Close: 0x80004005 (E_FAIL)
    

    Two command lists carry a record the parser does not know (0xc000b600), the remainder of each list is skipped, and both Close() calls then fail with E_FAIL; the null read follows within the same second. Hypothesis: a failed Close leaves the recording/allocator association unset and the xgameruntime thunk dereferences it.

    Deterministic

    A second run with all tracing switches removed crashes at the same address, in the same way — the fault does not depend on the tracing paths.

    Console-only slots called before the crash

    15× ID3D12CommandAllocator::#9              (not on PC)         +0x188501
    14× ID3D12GraphicsCommandList10::#126       (not on PC)         +0x3263e
    14× ID3D12GraphicsCommandList10::#142       (not on PC)         +0x329e9
    14× ID3D12GraphicsCommandList10::#75        (console extension) +0x32820
     4× ID3D12GraphicsCommandList10::#131       (not on PC)         +0x2478cba
     4× ID3D12GraphicsCommandList10::#132       (not on PC)         +0x2478c99
     1× ID3D12CommandQueue::#31                 (newer layout)      0x0
    

    With console-list tracing enabled, the older slot set is used instead: #21 #22 #23 #34 #50 #52 #70 #71 #72 #74 #139 (all ID3D12GraphicsCommandList(console)).

    Not a regression from the 2026-11-24 commits

    Built 7ac0828 (2026-11-23 05:57) from source and ran the same package: it fails earlier, on the title's own assert —

    Game exited with code 0x80000003
    CRASH: unhandled exception 0x80000003 in game_scarlett_master.exe+0x1e1cfe9
    Unimplemented: d3d12_xs.dll!D3D12ConfigureVirtualMemoryX  (first call +0x1e1cfe5)
    

    so main has moved past device/heap/UMA/sparse-window and window creation; the remaining gap sits on the command-list record path. This build also contains 02bfd1d (the no-high-entropy-ASLR link change), and the outcome is unchanged by it.

    Offer

    I can attach the full 18.6 MB trace log (D3D12 calls + console list records) or a trimmed window around the fault if that is useful. The structured report.json from this run is also available.

  3. Rednaxeh commented on Nov 24, 2026

    @Rednaxeh
    Contributor

    From the log: the system XGameRuntime (System32\xgameruntime.dll, Gaming Services) is present but refuses to initialise on this PC – XGameRuntime PC: initialization → 0x80110474 (COMADMIN_E_REGDB_SYSTEMERR), at both InitializeApiImplEx2 calls (1.3 s and 3.8 s; the title makes the same two calls on a working PC). XCL logs the failure and carries on as if it had succeeded: pc_init still calls start_pc_async, and QueryApiImpl keeps handing the title that runtime's objects (XAsync: PC, XDisplay: PC, XClosed: PC). The crash is a null read inside that DLL (rcx=0) right after the second failed initialisation, at 3.821 s on the same thread.

    Claiming the XCL side: when the system runtime's initialisation fails, XCL treats it as absent – its own XTaskQueue / XAsync and XAccessibility, the rest missing, as on a PC without Gaming Services – and the warning names the HRESULT and says to repair Gaming Services. A unit test covers the fallback. I cannot reproduce the broken Gaming Services here (RDNA3, init succeeds), so the run on the reporter's PC will be the proof; @Itsig0, repairing Gaming Services (Settings → Apps → Gaming Services → Repair / Reset) should also get you past this on current main.

    Written with Claude Code (Claude Fable 5.1).

  4. Rednaxeh commented on Nov 24, 2026

    @Rednaxeh
    Contributor

    Correction: this is already fixed by #235 (ofc0urse, open since yesterday, mergeable on current main): a refused InitializeApiImpl* makes pc_object return nothing, so XAsync and XAccessibility are XCL's, as on a PC without Gaming Services – the same change I described above, with a test of the forced refusal and runs on NVIDIA, RDNA4 and Wine. I withdraw my claim; I had searched for the HRESULT and missed it. What this issue adds to #235 is a third HRESULT for the same refusal: 0x80110474 here, 0x80073cfc and 0x80040154 (Wine) over there. @Itsig0 @Key-rs, a build of #235's head merged on main should get your runs past this crash; until it merges, repairing Gaming Services (Settings → Apps → Gaming Services → Repair) is the way around it.

    Written with Claude Code (Claude Fable 5.1).

  5. Key-rs commented on Nov 24, 2026

    @Key-rs

    #235 fixes this on the RTX 4060 Laptop — plus a fourth HRESULT for the same refusal

    Merged refs/pull/235/head onto main locally (merge commit 0aca19f, one file touched: hle/xgameruntime/api.rs), rebuilt, ran the same package with the same settings. The xgameruntime.dll+0x1098ce null read is gone.

    Result after #235

    窗口标题: XCL – Grand Theft Auto VI | 29.8 FPS | compiling shaders: 0 running, 26 done, 57797 pipelines queued, 26 failed
    xcl: D3D12.X: 8100 frames presented, 30.0 fps over the last 300
    xcl: D3D12.X: backend 'real' – NVIDIA GeForce RTX 4060 Laptop GPU (7956 MiB VRAM)
    

    Process stayed alive at ~7.6 GB working set; 8 100+ frames presented at a steady 30.0 fps. No crash, no watchdog kill within the ~10 minutes observed.

    One correction to the HRESULT list

    On this machine the refused initialisation reports 0x80070424 (ERROR_SERVICE_DOES_NOT_EXIST), not 0x80110474:

    xcl: XGameRuntime: InitializeApiImplEx2(0x633600002712, 0x65f400001edd, flags 0x2) – title goes through the GDK thunks
    xcl: XGameRuntime PC: initialization → 0x80070424
    xcl: XGameRuntime: InitializeApiImplEx2(0x633600002712, 0x65f400001832, flags 0x3) – title goes through the GDK thunks
    xcl: XGameRuntime PC: initialization → 0x80070424
    

    That is because the Microsoft.GamingServices package is not installed at all here (Get-AppxPackage *GamingServices* returns nothing); System32\xgameruntime.dll exists as an OS file, but nothing initialises it. So the family is now 0x80110474, 0x80073cfc, 0x80040154 (Wine) and 0x80070424 — the last one is the "package absent" variant, which is probably the most common on a plain Windows install.

    Repairing Gaming Services would not have helped in this case (there is no package to repair), so #235's fallback is the only way through — good confirmation that the PR addresses the class rather than one HRESULT.

    What is left after the fix (not part of #1302, for the record)

    The title now sits in pipeline compilation and presents a blank surface:

    xcl: D3D12.X: console shaders in the PSO without a translation:
         mesh pipeline with its MS 8c274e3123b82f44 in the AS slot – refused
         (same for f8b4ec63795b957a, c505395fd3869f71, 8880e152e9d88cf5, c107ef58496ad61d, fb5ee08e44bf0a18 …)
    

    26 of 57 797 queued pipelines were refused so far, all of them mesh pipelines whose MS sits in the AS slot. Consistent with the mesh-pipeline gap tracked elsewhere; not a regression from this change.

    Offer

    I can attach the full log of the post-#235 run (xcl-run-pr235.log, ~9 k lines, no tracing switches) if it is useful for the merge decision.

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