In Progress Please fix memory leakage

Users who are viewing this thread

Since setting shader /texture /texture streaming at high, Ram fills up a lot quicker. I do now get immediate crashes when ram is filled out. Windows opens a prompt saying the application must be closed as it filled ram and system gets unstable. Then the game crashes and it takes a while to come up with the crash reporter and then uploading the dump. When I played on low, it took a lot longer to fill the ram. It must be related to graphics quality/texture size and the unpacker.exe unpacking game texture files. I can run the game on high fluently even though my system is quite old.

How to Reproduce: Play the game and ram gets filled quickly according to quality settings.
Quest/Settlement Name (if related): no
Media (Screenshots & Video): Made screenshots a while ago, then with medium settings, now with high ram is filled quicker.
Version: 1.4.2 Beta
Installed community-made modifications: Autotrader, modlib, bannerlord tweaks, Fastdialogue
Computer Specs
:
OS: Win 7
GPU: Radeon 7970 Windforce/R9 290
CPU: AMD FX 8350
RAM: 16 GB DD3
Motherboard: Asrock whatever
Storage Device (HDD/SSD): Hybrid HDD 1 GB with 32 GB SSD

Here made screenshots of my settings
W1oWwBq.jpg

and the windows resource monitor (german). As you can see in the resource monitor of the Ram, even though supposedly after fresh start of the game a lot of Ram is still free, the game causes page faults/page errors (down right corner). Like while using virtual Ram, but shouldn't 16 GB be enough? (page faults appear when a program wants access to resources that are not in the physical ram but the slow and crappy virtual ram. Why is the game meddling with the virtual Ram if there are 10 GB of Ram free???)
BY9M40r.jpg
 
Last edited:
Ok, delved into this using Rammap. Prepare for a lot of images with files called "gtex" as these are the little culprits clogging up your ram. Rammap is a free windows tool which actually shows you in detail how your ram is being used. I also made a save file (RMP-file) if you want it for the developers or so.

Ok this is the Rammap Overview: (as you can see it is not the bannerlord process file (bannerlordlauncher) but the mapped files that clog the ram and I can show you why a bit later:

vyt20u6.jpg


Here you see the active mapped processes. A lot of gtex files are loaded: (My guess is these are texture files loaded by the sub process unpacker.exe

J3k4kaG.jpg


Here you can see an example screenshot of all the mapped tileset/gtex file clogging up ram by filling the mapped ram:

yHTZaaX.jpg


Here the detailed view of the biggest gtex files und up the module for the worldmap with 400 mb Ram

xxk4hF5.jpg


More gtex files. Lots of them, my laymen guess it is the ingame textures. Great revelation soon coming ^^

WLLJl0N.jpg


But first more smaller gtex files ^^

WLLJl0N.jpg


This is the process taleworlds.mou in the actual physical Ram. Seems fine imho

hI05E3o.jpg



Ok now the big revelation! Look: The same gtex file reserving ram space again and again and again! That is why the ram is clogging up!

qfymPMC.jpg


And here the very same gtex file reserving more space, like hundreds of times:

bIRH4t6.jpg


And here another one with many copies of itself clogging up the Ram:

lfKhryT.jpg



So imho this is the reason for the ram leak. Gtex files clogging up the reserved/mapped Ram with hundreds of copies of themselves. Like the same files loaded over and again. If the subprocess unpacker.exe was forbidden to reserve Ram for more than one instance of a gtex file, this might solve the issue. But could also be a windows problem dunno. Try it out yourself with rammap if you have the same ram leakage issue like me.

This is the same issue but in the windows task manager. As you can see the ram is full even though the game process only needs about 4 GB Ram itself. As described above but not seeable in the windows task manager, the rest of the ram is clogged up with these gtex files.

IOMkVkn.jpg


Hope this might help solve the issue. Write to me if you want the Dump / Rammap RMP file where I saved the view into the ram.
 
Hi, after some more googling I found the reason for the issue and it is NOT Bannerlord, but windows. If you have the issue of RAM piling up, check this out: (it is a detailed instruction on how to use Rammap or emptystandbylist.exe to clear standby Ram which clogs some systems. So for the developers: It is NOT a Bannerlord problem. It is a Windows issue of prefetching too much files and piling up standby memory for big programmes like bannerlord and other games. Many people have the same issues with a lot of other games. Windows rather tends to use all your Ram which is a good thing, but it also tends to rather compress Ram or use virtual memory rather than to release currently unused or rather at the moment useless standby memory.


In the link there is one way described to do it manually with Rammap, or another to do it automatically with emptystandbylist.exe. I recommend the automatic way, though it is not well described on the site. Here is an excellent step by step video on how to auto clear standby memory and never be bothered by clogged up standby ram again: (the file you need ifor this is absolutely safe).




For further read and confirming this affects many users and many games and that the root course is windows:

 
Last edited:
Hi, after some more googling I found the reason for the issue and it is NOT Bannerlord, but windows. If you have the issue of RAM piling up, check this out: (it is a detailed instruction on how to use Rammap or emptystandbylist.exe to clear standby Ram which clogs some systems. So for the developers: It is NOT a Bannerlord problem. It is a Windows issue of prefetching too much files and piling up standby memory for big programmes like bannerlord and other games. Many people have the same issues with a lot of other games. Windows rather tends to use all your Ram which is a good thing, but it also tends to rather compress Ram or use virtual memory rather than to release currently unused or rather at the moment useless standby memory.


In the link there is one way described to do it manually with Rammap, or another to do it automatically with emptystandbylist.exe. I recommend the automatic way, though it is not well described on the site. Here is an excellent step by step video on how to auto clear standby memory and never be bothered by clogged up standby ram again: (the file you need ifor this is absolutely safe).




For further read and confirming this affects many users and many games and that the root course is windows:


I disabled prefetching and superfetching but still get stuttering in the game.
 
Nope astragus, the standby issue is old news and stopped being relevant ever since 1809 afaik. this issue is 100% from this particular game.
 
I downloaded the program RamMap that astragus was using and clearing the standby list had no effect. However, there is an option on the program to "Empty Working Sets." I used this while the game was running while it was reaching high levels of memory usage and it completely cleared up the memory problem without having any negative effects on my game. The memory continues to leak but using this clears it to regular levels each time. Hopefully this information is of some use.
 
Back
Top Bottom