Gothic 3

Gothic 3

Khimari Nov 16, 2023 @ 4:35am
[SOLVED] Gothic 3 - 3,445 GB RAM crash [RAM STABILIZER]
Hi guys,

TL;DR

If the game executable RAM usage reaches 3,445 GB, the game crashes (random memory error) and there is only one thing I could do about it. Tweak "g3.ini" file in a such way, that the game looks the best it could and never reaches that usage of RAM (excesive usage of high quality tweaks). Only thing to help raising the quality beyond this limit and keeps the game stable, is 64bit port of the main executable, I believe.

LV:

I just recently tried to mess with this game. I found, that the game crashes with many random error messages, no matter what, if the executable fills the RAM up to 3,445 GB.

For as long, as you keep the RAM (INI graphic tweaks, distance view tweaks, MODS, all tweaks together) under 3,4GB for the executable, game runs allmost 100% (few hickups) smooth & dandy. Sadly, as you move through the world, objects pop-in and cause spikes in RAM usage. If such spike jumps over mentioned RAM usage limit, game crashes again...

I also patched all DLL/EXE files to get more RAM which was reserved by system (large aware adress - be able to use more than 2GB RAM), sadly the limitation of 32bit executable causes deadly stroke to the engine itself. Lots of objects and far view distances and RAM gets filled in no time.

Question:

Any of you know about some core MOD or edit that would somehow help the engine to use more RAM? I'm affraid this is not possible just by simple INI tweaks and commands, would require to port the game to 64bits, I guess. Couldn't find any info tho.

EDIT:

FYI - biggest RAM hog is indeed...

Render.PrefetchGridCellSize=XXXXX
DistanceHigh.fFarClippingPlane_High=XXXXX

..both values are responsible for close clipping plane causing ugly LODs. Game uses only only LOD0 and LOD1 system.

Basic settings (10k/10k) already attacks 2,2GB RAM (1080p), add average of 500MB RAM while moving in the world, that's like 2,5-2,7GB RAM without tweaks. Not much headroom to shift these INI numbers as raising these causes RAM usage to ramp up *squared*.

So sad :(
Last edited by Khimari; Nov 24, 2023 @ 2:20pm
< >
Showing 1-4 of 4 comments
So much text, and yet you haven't mentioned what version of the game you refer to. You only mention an unknown number of mods, which can reduce stability a lot because of lack of testing.

Is it version 1.6 or version 1.75.14 of the game? Be sure to upgrade following one of the options mentioned in this guide, but be cautious and don't mod your installation to death:
https://steamcommunity.com/sharedfiles/filedetails/?id=922996693


Gothic 3 here is extremely stable. I've never experienced any memory error or stability problems.
Khimari Nov 16, 2023 @ 11:50am 
Version doesn't matter as it counts towards all of them, I tried every version up to the"Parallel patch".

For as long as you don't edit "g3.ini" beyond very minor hi-poly clipping plane / prefetch distance extension shift, it's all fine. Low-poly is quite conservative, can go over milion of units with no impact.

Major hi-poly range tweaks causes massive rise of RAM ussage, very fast hitting game's 32bit memory adress limitation (2GB+2GB game/OS reserved). It can be tweaked to 3/1, but still not enough to get rid of those awfull LOD1 textures for longer than tens of minutes. They're really uggly and painfull to observe. Considerin the failure to properly unload data off the memory while player moves through the gameworld..

Maybe someone re-wrote the main executable to 64bit version? But I've got an idea, myebe DoF could ease the pain somehow..
Khimari Nov 24, 2023 @ 2:17pm 
OK, i found at least some solution to my problem.

Whoever stumbles upon this, know, there is one quite helpfull. All you need is to search for "CFF Explorer" app on web and use this app to help stabilize game's RAM management. The guide follows:

1) Install "CFF Explorer" and run it 2) Open main Gothic 3 game executable (Gothic3.exe) in the "CFF Explorer" 3) Once the file is loaded into CFF, click in the "CFF Explorer" on the "File Header" row (under "Nt Headers" section - left column) 4) Click the second "Click here" blue stripe in row of "Characteristics" 5) In the next table be sure to check these two rows:
  • App can handle >2gb adress space (32bit RAM fix to use up to 3,4GB RAM)
and then
  • AGRESSIVELY TRIM WORKING SET
6) Close the app and when it asks to override the .exe file, click yes and save

This "AGRESSIVELY TRIM WORKING SET" second checkmark is the most important part, it stabilizes game's RAM usage by forcing the game's executable to flush data off RAM to physical drive once RAM usage reaches critical tresholds causing G3 to crash! Game doesn't properly flush RAM data on it's own and this causes RAM usage overload!

This tweak is not bullet-proof and doesn't magically solve every CTD issues, but it helps to stabilize RAM usage. With this tweak the RAM usage hovers around 3.3GB RAM for "Gothic3.exe" and gets unloaded frequently as player moves through world. It helps to avoid shutdown crashes, thus making the gameplay more stable and also, as a bonus, less choppy...

With this tweak I was able to run through whole map up to north and back down to desert. It crashed then due corrupted sound file off modification. But not because of RAM issue! So.. yeah, :steamhappy: success!
Last edited by Khimari; Nov 24, 2023 @ 2:29pm
Great work finding this fix, i thelped me alot! :)
< >
Showing 1-4 of 4 comments
Per page: 1530 50