Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Welcome to the Life is Feudal: MMO community! Here you can ask your basic starters questions.

Davycrockett
 
Posts: 7
Joined: 21 Aug 2018, 20:16

Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Post by Davycrockett » 23 Aug 2018, 23:48

Hi,

If you have 4GB of VRAM in your GPU, the game engine does not handle it correctly. It can cause an insufficient amount of memory reserved for textures, resulting in high quality textures never appearing.

The game engine calls IDXGIAdapter::GetDesc, See https://docs.microsoft.com/en-us/windows/desktop/api/dxgi/nf-dxgi-idxgiadapter-getdesc, and uses the DedicatedVideoMemory value to determine the amount of memory to reserve for textures in its GFXStreamableTextureManager class. See https://docs.microsoft.com/en-us/windows/desktop/api/dxgi/ns-dxgi-dxgi_adapter_desc

In the game engine, the DedicatedVideoMemory value is a SIZE_T, which can hold 64 bit values on 64 bit systems. Unfortunately, the LiF game engine mishandles this value as a 32 bit value resulting in an integer overflow.

If your graphics card has more than 4GB or more, this game engine bug will reserve the wrong amount of memory for textures.

In my particular case, my GPU shows exactly 8GB (0x200000000) in the IDXGIAdapter::GetDesc API. The game engine converts this to a 32-bit value by ignoring the high bits, resulting in 0 VRAM (0x00000000), so the game's texture manager initializes 0 space for textures. The result is that the high quality textures never pop in. The game log shows Out of Texture Memory errors as a consequence.

Screenshot: https://i.imgur.com/zMog3GF.png
Image

Game log on Low settings: https://bpaste.net/show/0def78236775
Game log on Ultra settings: https://bpaste.net/show/b69bdbdcb37f

ECHO 2018-08-23 16:38:38.059 {} <<Thread>> [] GFXStreamableTextureManager initialized. Texture memory budget: 0, memory warning level: 0 [T:WorkerThread0:0x865E2C8]
ERRR 2018-08-23 16:40:05.952 {} <> [55268] Error: failed to load texture art/Textures/TunnelTextures/Soil/Soil_wall_nm.dds: out of texture memory budget (0 / 3)!
ERRR 2018-08-23 16:40:06.297 {} <> [55276] Out of texture memory, trying to lower texture quality by 2



Thanks for fixing this issue!


Davycrockett
 
Posts: 7
Joined: 21 Aug 2018, 20:16

Re: Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Post by Davycrockett » 24 Aug 2018, 23:48

I figured out what the issue was, and I updated the OP to describe the issue and how to fix it.

@Arrakis fyi

User avatar
Arrakis
 
Posts: 5461
Joined: 25 Oct 2013, 14:11
Location: Sparksvaard, the middle world; the world of people.

Re: Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Post by Arrakis » 25 Aug 2018, 12:46

Thanks for the update. We'll look into it.



Facebook8
 
Posts: 1
Joined: 10 Feb 2019, 02:41

Re: Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Post by Facebook8 » 10 Feb 2019, 10:41

have the same run a new nvidia 2080
i dont understand how to apply the fix if it was posted already

i have to say its sad a thing reported a half year ago is not fixed yet!

update:

when i did tab out of game to write this and tab back in again the textures did load in full quality?

so maybe its a first login into game issue?
i will keep u updated if it happens again


Vojtech.darebnik
 
Posts: 1
Joined: 28 Apr 2020, 21:02

Re: Game engine 64-bit bug: 4GB or more of GPU VRAM causes integer overflow

Post by Vojtech.darebnik » 28 Apr 2020, 21:04

I have the same issue. Is there any workaround or how can I correct this?

Return to Newcomer Section