protonscr

[D3D9] Kohan II - memory allocation issues (not LAA)

dxvkclosed d3d9
doitsujin/dxvk#2030 · opened 2021-04-18 by WinterSnowfall · updated 2021-04-30 · 1 comments · github
WWinterSnowfall 2021-04-18 github

Kohan II throws a err: DxvkMemoryAllocator: Memory allocation failed error right when starting the game, yet manages to show the main menu, potentially start a mission, but then crashes randomly. It does not appear to be LAA related, but rather due to the game allocating all the memory it detects for itself.

I have been playing the game through half of its main campaign now with:

d3d9.memoryTrackTest = True

And this seems to fix it without any ill effects - here's a log with the above parameters set: k2_d3d9_fix.log

If this makes sense to you (as in you think it's the right way to fix it), please add it as a permanent override. I am not entirely sure what memoryTrackTest is supposed to do or how it works, but it has addressed the problem in conjunction with the maxAvailableMemory setting on both an Nvidia GPU and an Intel iGPU.

The game is somewhat difficult to get running in Wine, so I doubt anyone has noticed the problem, though I've seen some ProtonDB posts suggesting the use of Proton prior to 4.11 or WineD3D to play the game, which might be related to the above. WineD3D does indeed work fine.

Software information

Kohan II - Kings Of War (Warchest boxset), compatible with the Steam version.

The executable name (k2.exe) is shared between the original retail release (which is a PITA to get working these days even on Windows, due to SecuROM), the notoriously rare Warchest boxset release, and AFAIK the Steam release of the game (which should be repackaged Warchest).

System information

  • GPU: GTX 1080
  • Driver: 460.67.0
  • Wine version: 6.6 Staging
  • DXVK version: 1.8.1

Apitrace file(s)

  • N/A

Log files

WWinterSnowfall 2021-04-23 github

After a few more missions on my desktop (Nvidia GPU), it looks like d3d9.maxAvailableMemory = 1024 is not really needed, but in my case fixed a later crash caused by limited memory availability on the Intel iGPU.

d3d9.memoryTrackTest = True on its own is enough.

Nothing extracted yet.