Page 1 of 1

[0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Wed Jan 03, 2018 9:31 pm
by Reika
The full explanation, including logs and screenshots, can be found here, but the basic idea is that the game is occasionally (1 launch in 10-20) running out of VRAM when I have more than enough, then - more problematically - deleting my entire configuration settings.

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 9:33 pm
by Rseding91
Thanks for the report. Can you upload the mod(s) you're using?

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 9:35 pm
by Reika
Rseding91 wrote:Thanks for the report. Can you upload the mod(s) you're using?
The modlist is attached. Or do you want the mod files themselves (>200MB in total)?

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 9:36 pm
by Rseding91
Reika wrote:
Rseding91 wrote:Thanks for the report. Can you upload the mod(s) you're using?
The modlist is attached. Or do you want the mod files themselves (>200MB in total)?
The mods themselves.

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 9:53 pm
by Reika
Rseding91 wrote:
Reika wrote:
Rseding91 wrote:Thanks for the report. Can you upload the mod(s) you're using?
The modlist is attached. Or do you want the mod files themselves (>200MB in total)?
The mods themselves.
Done. I managed to strip out more than half of the size, as it was .git and .pdn data from my own mod folders, which is obviously not being used by the game.

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 10:48 pm
by chrisgbk
I was having similar issues with substantially less mods on a GTX980, somewhere around the latest patch. I basically set everything graphics related to default to try to load but it didn't work. I eventually had to enable texture compression to be able to load. My settings never ended up deleted however, just sprite quality changed from high to normal, and I was using the DirectX subsystem, not OpenGL.

With texture compression disabled, I both ran out of not just VRAM, but also system RAM (16 GB installed) -and- pagefile - in total almost 30 gigabytes was allocated during startup before Windows cut it off forcefully when I tried increasing VRAM usage from High -> All.

However, after enabling texture compression, I was able to load, and also able to disable texture compression again without breaking again - leading me to think there was something corrupted in one of the caches (pretty sure I had cache-sprite-atlas=true at the time, which ended up being disabled), presumably because it forced the game to regenerate the cached versions of everything when I enabled texture compression. Interestingly, I errored out on the exact same file with the same error (__base__/graphics/entity/artillery-wagon/hr-artillery-wagon-base-1.png).

If it helps, the only mod in common between both of us is research-queue.

Re: [0.16] Running out of VRAM with 6GB + Game Deleting Settings

Posted: Wed Jan 03, 2018 11:15 pm
by Reika
chrisgbk wrote:I was having similar issues with substantially less mods on a GTX980, somewhere around the latest patch. I basically set everything graphics related to default to try to load but it didn't work. I eventually had to enable texture compression to be able to load. My settings never ended up deleted however, just sprite quality changed from high to normal, and I was using the DirectX subsystem, not OpenGL.

With texture compression disabled, I both ran out of not just VRAM, but also system RAM (16 GB installed) -and- pagefile - in total almost 30 gigabytes was allocated during startup before Windows cut it off forcefully when I tried increasing VRAM usage from High -> All.

However, after enabling texture compression, I was able to load, and also able to disable texture compression again without breaking again - leading me to think there was something corrupted in one of the caches (pretty sure I had cache-sprite-atlas=true at the time, which ended up being disabled), presumably because it forced the game to regenerate the cached versions of everything when I enabled texture compression. Interestingly, I errored out on the exact same file with the same error (__base__/graphics/entity/artillery-wagon/hr-artillery-wagon-base-1.png).

If it helps, the only mod in common between both of us is research-queue.
This has persisted across multiple 0.16 updates for me, so I doubt there is a cache issue, unless those caches persist across version updates (which seems unlikely given the likely resultant invalidity of said cache). The same applies to modlist changes.

Also, my settings:
Image

Re: [0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Wed Jan 03, 2018 11:18 pm
by Rseding91
I looked into it and the error it's giving is not saying it ran out of VRAM: it's saying it ran out of RAM.

When I load the game with high-res graphics enabled with the mods you've got it takes 8 GB of RAM loading high-res sprites to reach the main menu before it settles down to 3.6 GB used on the main menu.

Try this:

Go into the config.ini file and un-comment "thread-sprite-loading" and set it to false.

It's auto-disabled if you have less than 12 GB of RAM with high-res enabled but you're exactly at 12 GB and are probably using a bunch of it already for other processes.

Re: [0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Wed Jan 03, 2018 11:22 pm
by Reika
Rseding91 wrote:I looked into it and the error it's giving is not saying it ran out of VRAM: it's saying it ran out of RAM.

When I load the game with high-res graphics enabled with the mods you've got it takes 8 GB of RAM loading high-res sprites to reach the main menu before it settles down to 3.6 GB used on the main menu.

Try this:

Go into the config.ini file and un-comment "thread-sprite-loading" and set it to false.

It's auto-disabled if you have less than 12 GB of RAM with high-res enabled but you're exactly at 12 GB and are probably using a bunch of it already for other processes.
I will try that, though the infrequency of the crash means determining the result might take some time.

As for the RAM usage - are you sure? My monitoring software reports a peak RAM usage of less than 5GB.

Re: [0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Fri Jan 05, 2018 3:32 pm
by posila
Thanks for the report.
As of 0.16.14 the game should not purge rest of the settings when reducing graphics quality.
Also we found unnecessary memory allocation in OpenGL renderer, so you shouldn't have problems with running out of RAM in 0.16.15 anymore (unless it turnes out it was not so unnecessary before .15 is released)

Re: [0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Fri Jan 05, 2018 9:29 pm
by Rseding91
posila wrote:Thanks for the report.
As of 0.16.14 the game should not purge rest of the settings when reducing graphics quality.
Also we found unnecessary memory allocation in OpenGL renderer, so you shouldn't have problems with running out of RAM in 0.16.15 anymore (unless it turnes out it was not so unnecessary before .15 is released)
Ahh, OpenGL. I was testing on DirectX.

Re: [0.16] Running out of VRAM with 6GB + Game deleting settings

Posted: Fri Jan 05, 2018 10:28 pm
by Reika
Rseding91 wrote:
posila wrote:Thanks for the report.
As of 0.16.14 the game should not purge rest of the settings when reducing graphics quality.
Also we found unnecessary memory allocation in OpenGL renderer, so you shouldn't have problems with running out of RAM in 0.16.15 anymore (unless it turnes out it was not so unnecessary before .15 is released)
Ahh, OpenGL. I was testing on DirectX.
For what it is worth, I have never changed my render engine settings; I have left that on default since I have had the game (late 0.11, standalone install).