protonscr

Battlefield 2: crash when Lightning and Dynamic Shadows are set to high

dxvkclosed duplicate
doitsujin/dxvk#1557 · opened 2020-04-06 by bno1 · updated 2020-04-07 · 5 comments · github
1 matching comments, n / p to jump
Bbno1 2020-04-06 github

It only happens on DXVK during map loading and it's a bit fiddly. Sometimes it works with Dynamic Shadows set to medium, sometimes it doesn't. Once it randomly didn't crash but when entering the game it was running at 2 seconds/frame and the weapon was completely black. I don't have a trace of that run unfortunately.

This issue was also discussed on d9vk, but no trace/logs were provided for this crash: https://github.com/Joshua-Ashton/d9vk/issues/415

Screenshot of the crash error dialog:
Screenshot_2020-04-07_00-08-23

Software information

Battlefield 2 v1.5, Lightning and Dynamic Shadows set to High. Other options don't matter.

System information

  • GPU: GTX 960m
  • Driver: 440.64
  • Wine version: 5.5
  • DXVK version: 1.6

Apitrace file(s)

https://drive.google.com/file/d/1FiolLb1cUJeRBCOz8pPXnfsX7yJY6NtX/view

Log files

BF2_d3d9_crash.log

Ddoitsujin maintainer 2020-04-06 github

See #1318 , tl;dr use a wine build that supports large address aware override (e.g. from Lutris) and set WINE_LARGE_ADDRESS_AWARE=1.

Bbno1 2020-04-07 github

I did some more tests tests with LAA and this is what I found:

  • With Lightning = High, Dynamic Shadows = Off and everything else High the game crashes as described when loading the map "Operation Smoke Screen" in singleplayer.
  • With the same settings the map "Strike at Karkand" loads fine. If you try loading "Operation Smoke Screen" after "Strike at Karkand" it also loads fine.
  • Upping Dynamic Shadows to Low causes the game to crash even for "Strike at Karkand".

Without dxvk even when everything is set to High I can't cause the crashes that I'm seeing. If address space exhaustion is the problem then dxvk is allocating a big chunk of memory for the map "Operation Smoke Screen" except if "Strike at Karkand" is loaded before it.

Is there a way to print virtual address space allocations that might be done by the game or by dxvk?

Ddoitsujin maintainer 2020-04-07 github

I think there's some way to print virtual memory mappings in /proc, but not sure off the top of my head how to use that exactly. That said, DXVK is known to have significant memory overhead compared to wined3d, and it's not an easy thing to improve at all.

Bbno1 2020-04-07 github

I understand. This issue can be closed if you think there is nothing that can be done about it, the game works fine with Lightning set to Medium. I might try to trace the allocations when I some have time, maybe something pops up.

Ddoitsujin maintainer 2020-04-07 github

I'll do that because we have a meta issue (kind of) for this sort of thing (#1318).

Launch options