protonscr

`Memory allocation failed` in BFBC2 when in server's browser

dxvkclosed
doitsujin/dxvk#500 · opened 2018-07-17 by byaka · updated 2019-12-11 · 8 comments · github
Bbyaka 2018-07-17 github

Tested today in ~5 hours session - works really well (max settings). Have issue with shader's compilation - fps drops to ~5. But this is not a problem, just stagging 5-7 minutes while all shaders will compile. After this 5 hours without issues.
Only problem - in server's browser it crachs after few seconds. So selecting server not ezy lol.
Battlefield Bad Company 2.zip

Bbyaka 2018-07-17 github

ofc in this moment i have enouth memory (more than half)

Ddoitsujin maintainer 2018-07-17 github

Please add an apitrace. For some reason it's trying to allocate 1GB of memory all at once, there is probably a reason for it but it's impossible for me to figure out what the game is trying to do without an apitrace.

In general though, out-of-memory errors are expected with 32-bit DXVK and cannot be fixed. DXVK uses persistently mapped buffers for performance reasons, but they take away a large chunk of the already very limited virtual address space of 2GB that 32-bit Windows applications can access.

Bbyaka 2018-07-17 github

doing this first time and cant find instruction, so...

  1. i need to disable dxvk first right? switching lib in winecfg to builtin enouth? (dxvk installed globally for prefix)
  2. i just need to run wine apitrace.exe trace -a dxgi YOURGAME.exe and wait until it ends, right? this command just logs me to terminal and don't shows me app's window - this confusing me.

If i understand all right, this is result
BFBC2Game.trace.zip

Ddoitsujin maintainer 2018-07-17 github

Try this instead.

Bbyaka 2018-07-17 github

With this libs i have strange thing - white unresponsed window and

apitrace: warning: caught exception 0xc0000005
apitrace: flushing trace

in wine's output. waited 5 minutes - nothing changed.
in archive included dxvk logs, trace files and full log from wine
Battlefield Bad Company 2.zip

Ddoitsujin maintainer 2018-07-17 github

Well that just means that apitrace crashed. Not helpful at all sadly.

Bbyaka 2018-07-17 github

Maybe i'm just upload for you my prepared prefix with game? It's only 8gb.

Rryao 2018-09-24 github

In general though, out-of-memory errors are expected with 32-bit DXVK and cannot be fixed. DXVK uses persistently mapped buffers for performance reasons, but they take away a large chunk of the already very limited virtual address space of 2GB that 32-bit Windows applications can access.

I disagree. Here is a possible fix:

https://github.com/ValveSoftware/wine/pull/22

Upstream links

Error codes