Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
WinterSnowfall opened this issue Apr 18, 2021 · 1 comment
Closed

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

WinterSnowfall opened this issue Apr 18, 2021 · 1 comment
Assignees
Labels

Comments

@WinterSnowfall
Copy link
Contributor

WinterSnowfall commented Apr 18, 2021

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

@WinterSnowfall
Copy link
Contributor Author

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.

@K0bin K0bin added the d3d9 label Apr 30, 2021
@K0bin K0bin self-assigned this Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants