protonscr

[d3d11] Cuphead crashes with memory access voilation

dxvkclosed can't reproduce
doitsujin/dxvk#4746 · opened 2025-03-08 by e2dk4r · updated 2025-03-09 · 4 comments · github
1 matching comments, n / p to jump
Ee2dk4r 2025-03-08 github

Cuphead crashes with memory access voilation after trying to load save.

Software Information

Game Cuphead
Version Patch 1.3.4 (Steam 9318602)
Save file cuphead.tar.gz

System Information

software version
kernel 6.14.0-rc4
mesa 25.0.99 (104857699) 6e3fc37d472d1f7d297e5336082473d1f04b94e1
wine 10.0
gpu AMD Radeon RX 6900 XT (RADV NAVI21)
dxvk 1b529c711cb9a9e49a51e736a15fcddf3953df93

Reproducable Steps

  1. Setup wine
$ export WINEPREFIX="/tmp/gaming/wine"
$ export WINEHOME="$WINEPREFIX/drive_c/users/$USER" 
$ wineboot
$ wineserver -w
  1. Setup dxvk
$ cp dxvk/bin/*.dll "$WINEPREFIX/drive_c/windows/system32"
$ for dll in d3d8 d3d9 d3d10core d3d11 dxgi; do
    wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $dll /t REG_SZ /d native /f >/dev/null 2>&1
  done
  1. Load Save File cuphead.tar.gz
$ tar xf cuphead.tar.gz -C "$WINEHOME"
  1. Start Cuphead
$ cd Cuphead
$ wine Cuphead.exe
  1. Try to start the game from save
`Press Any Button` > `Start` > `Cuphead A` > `Player Select` 

Apitrace file(s)

Not included because game crashes at startup.

Log Files

$ tar cf -C "$WINEHOME" 'AppData/LocalLow/Studio MDHR/Cuphead' | gzip -3 > cuphead.log.tar.zst

cuphead.log.tar.gz

Additional Information

Is bug occurs in stable version?

No. Tested with dxvk v2.5.3

Ddoitsujin maintainer 2025-03-08 github

Works for me on current Proton-Experimental. Can you do a bisect?

Ee2dk4r 2025-03-09 github

Thank you for short notice. Sorry to wasting your time. Compiling from source fixes this problem.
I should have tried compiling from source as first step.

Problem was Gentoo's package manager (emerge).

Below bugfix was removed from dxvk-9999.ebuild but was in dxvk-2.5.3.ebuild

  # -mavx with mingw-gcc has a history of obscure issues and
  # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
  # crashes with -march=skylake >=wine-8.10, similar issues with
  # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
  append-flags -mno-avx

Adding this bugfix back fixed the problem.

Ddoitsujin maintainer 2025-03-09 github

Right, ye. AVX is known to be problematic because mingw-gcc will use 256-bit instructions without actually ensuring 32-byte stack alignment.

Iionenwks 2025-03-09 github

Removing it was only tentative, guess it's going back in for dvxk-9999 (that version is intended for testers only, glad it got noticed before a proper release -- sorry for the trouble).

Proton versions

Launch options