Skip to content

[BUG] Windows startup crash when Vulkan SDK DXC/DXIL is on PATH #39

@bruce55

Description

@bruce55

Pre-flight checklist

  • I have read/searched the documentation
  • I have searched existing issues to avoid duplicates

Bug Description

SISR crashes during startup on my Windows machine when an older Vulkan SDK DXC/DXIL pair is visible on PATH.

This was reproduced and investigated with help from Codex as I know nothing about Rust. Apologies for AI slop in advance. The issue appears related to wgpu's DX12 shader compiler selection. With my normal PATH, SISR loads dxcompiler.dll / dxil.dll from Vulkan SDK and exits with a Rust panic. If I remove only the Vulkan SDK Bin directory from PATH for the SISR process, SISR starts successfully and loads d3dcompiler_47.dll instead.

To Reproduce

Exact steps to reproduce the behavior:

  1. Install/run SISR on Windows.

  2. Have this directory on PATH:

    C:\VulkanSDK\1.3.224.1\Bin
    

    This is from VulkanSDK-1.3.224.1-Installer.exe.

  3. Confirm that directory contains these files:

    C:\VulkanSDK\1.3.224.1\Bin\dxcompiler.dll
      FileVersion: 1.7.0.3618
    
    C:\VulkanSDK\1.3.224.1\Bin\dxil.dll
      FileVersion: 101.6.2112.13
    
  4. Start SISR normally, or run a minimal startup test:

    C:\Users\bruce\AppData\Local\SISR\SISR.exe `
      --console true `
      --tray false `
      --no-steam true `
      --update-notify none `
      --window-create true `
      --window-fullscreen false `
      --log-level debug
  5. SISR exits during graphics initialization with exit code 101.

  6. As a workaround test, run SISR with only the Vulkan SDK directory removed from PATH for that process:

    $env:Path = (($env:Path -split ';') |
      Where-Object { $_ -ne 'C:\VulkanSDK\1.3.224.1\Bin' }) -join ';'
    
    & "$env:LOCALAPPDATA\SISR\SISR.exe" `
      --console true `
      --tray false `
      --no-steam true `
      --update-notify none `
      --window-create true `
      --window-fullscreen false `
      --log-level debug
  7. With that workaround, SISR starts successfully.

Expected Behavior

SISR should start normally.

If DX12/wgpu initialization fails, SISR should report an actionable error instead of crashing during startup.

Actual Behavior

With the Vulkan SDK DXC/DXIL pair visible on PATH, SISR exits with code 101.

Observed panic:

Failed to create device: RequestDeviceError { inner: Core(Device(Lost)) }

In a diagnostic run after getting past device creation, the later failure was:

wgpu error: Validation Error

Caused by:
  In Device::create_render_pipeline, label = 'egui_pipeline'
    Internal error in ShaderStages(FRAGMENT) shader:
    DXC compile error: error: validator version 1,6 does not support target profile.

Screenshots/Logs

Attached raw logs:

Relevant diagnostic findings with normal PATH:

WGPU_BACKEND=None
WGPU_DX12_COMPILER=None

DX shader compiler candidate:
C:\VulkanSDK\1.3.224.1\Bin\dxcompiler.dll

DX shader compiler candidate:
C:\VulkanSDK\1.3.224.1\Bin\dxil.dll

Selected adapter:
NVIDIA RTX PRO 6000 Blackwell Workstation Edition
backend=Dx12
driver="32.0.15.9597"

Failed to create device:
RequestDeviceError { inner: Core(Device(Lost)) }

Loaded modules in the failing case:

C:\VulkanSDK\1.3.224.1\Bin\dxcompiler.dll
C:\VulkanSDK\1.3.224.1\Bin\dxil.dll

Loaded modules in the working workaround case:

C:\WINDOWS\SYSTEM32\d3dcompiler_47.dll
  FileVersion: 10.0.26100.8328

In the working workaround case, dxcompiler.dll and dxil.dll were not loaded.

Environment

  • OS: Windows
  • GPU: NVIDIA RTX PRO 6000 Blackwell Workstation Edition
  • NVIDIA Driver: 595.97
  • SISR Version: 0.3.1
  • VIIPER Version: 0.6.0
  • USB-IP Version: 0.9.7.7
  • Vulkan SDK on PATH: C:\VulkanSDK\1.3.224.1\Bin

Additional Context

This may be environment-sensitive rather than purely a SISR logic bug, but it is brittle for an installed application because startup depends on whichever dxcompiler.dll / dxil.dll pair appears first in DLL search / PATH.

It is possible that installing a newer Vulkan SDK would make this specific reproduction go away, but I have not tested that because I currently have another project relying on this SDK version.

Codex's Suggestions:

  • In the main executable, handle DX12/wgpu initialization errors more gracefully and include actionable logging.
  • Log which DX shader compiler DLLs are visible or loaded when DX12 initialization fails.
  • If FXC is acceptable for SISR, consider selecting it explicitly in code instead of leaving wgpu's DX12 compiler selection on Auto, for example by setting Dx12BackendOptions { shader_compiler: wgpu::Dx12Compiler::Fxc, ... }.
  • Consider documenting WGPU_DX12_COMPILER=fxc as a user workaround.
  • If DXC is preferred, consider shipping a known-good matched dxcompiler.dll / dxil.dll next to SISR.exe.
  • The installer script could detect known problematic DXC/DXIL pairs on PATH and warn the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions