Memory increses over time, Leak? New Game 6.0

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Fri, 14. Apr 23, 16:14

I just brought 6.0 on Steam last night and all seems to run fine for the first 2 hours, then the memory usage slowly increased from 10gb to close to max 15gb over some 2 hours, and then the game became a stuttering mess, but the displayed FPS stayed almost the same some how at 60-75 FPS, then after 2-3 minutes the game becomes playable again, but the game is still using much more ram than 5.10, at 14-15gb of memory, when I have 16gb installed.
The thing Is 5.10 runs well and only uses 6-7GB of memory, I have both versions installed.
All my drivers are up-to-date, and like I said it's only on 6.0 that I'm having this problem, and not 5.10, this is stock without any mods and a new game start, Steam checked the files etc, and I cannot get the vulkaninfo file using CMD, so If I really need it I try again or use a program in the morning, same with DXDiag.

PC: R3800x RX580 8GB, 16GB 3200MHZ, M.2, 1440p.

Sorry I no I have not added every think, but my brain is not working as its time for me to hit the sack.

ChatWithThisName
Posts: 1
Joined: Sat, 15. Apr 23, 00:04

Re: Memory increses over time, Leak? New Game 6.0

Post by ChatWithThisName » Sat, 15. Apr 23, 00:12

I've been experiencing the memory leak with X4: Foundations since I first got the game with Tides. Recently crashed due to an out of memory error 1113. I'm following their suggested steps. I'm currently waiting for the game to crash. The task manager shows it is using 30,827.9mb of memory. I have all the graphical settings to "low" preset.
I have a shortcut for the dxdiag on my desktop, and I'm running with the parameter "-debug FileIO" to provide the log file in the documents\Egosoft\X4<steamid>\*.log

The following were the instructions that popped up for the crash that occured originally when I had the crash with the latest kingdom end expansion, though the memory leak has existed since well before the latest expansion.
https://wiki.egosoft.com/wiki/X4:Exitcode_1113

Hopefully we can get to the bottom of the issue.

LameFox
Posts: 2406
Joined: Tue, 22. Oct 13, 15:26
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by LameFox » Sat, 15. Apr 23, 03:28

I am also seeing the game get up to 15GB if it runs long enough. A pretty new save I made during 6.0 RC3 (I believe). Is it meant to? I've never really paid it much attention before. It's not necessarily a problem for it on my system but since a 16GB system is "recommended" it does sound a bit odd, that would not leave much for the OS, let alone what it would do to one with the minimum requirements.

Not sure what would even help to check for this. I uploaded dxdiag and vulkaninfo for the beta anyway so I'll post them but it sounds as if it may not be specific to a particular system. Is there something else that might convey more?

https://drive.google.com/file/d/1RHi8wt ... sp=sharing
https://drive.google.com/file/d/1vZ17iK ... sp=sharing

edit: if it's any help, this does not appear to be normal for me. It happened at a time when I had left the game running overnight (without SETA in this case) and checked the usage in the morning, after seeing this thread. With my usual play, which involves a lot of tabbing out and browsing at the same time on my other monitor, it doesn't seem to be occurring (so far) but rather gets to six-point-something GB and then drops back down to a lower value and starts over.
***modified***

Venetrix2
Posts: 11
Joined: Sat, 21. Jan 23, 15:48
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by Venetrix2 » Sat, 15. Apr 23, 17:28

Someone posted on the Reddit saying they'd experienced this issue on Steam Deck and it appeared to be related to how often they were travelling between sectors - they'd run out of memory quickly after travelling around for a while, but when staying in the same sector for ages they were fine.

User avatar
chew-ie
Posts: 5599
Joined: Mon, 5. May 08, 00:05
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by chew-ie » Sat, 15. Apr 23, 17:51

Mmmh... so staying in the highway ring might help reproduce that quickly?

Image

Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!

:idea: Pick your poison seed [for custom gamestarts]
:idea: Feature request: paint jobs on custom starts

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Sat, 15. Apr 23, 22:31

I'm glad others have had or seen the same problem, and I was opening up the map when this happened, so maybe it is that, I just lunched steam to find a 70.71mb update for X4, and it's taking its time updating/installing, I will be more ready this time to get the needed files.

LameFox
Posts: 2406
Joined: Tue, 22. Oct 13, 15:26
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by LameFox » Sun, 16. Apr 23, 00:56

chew-ie wrote:
Sat, 15. Apr 23, 17:51
Mmmh... so staying in the highway ring might help reproduce that quickly?
After playing all saturday my RAM usage was only nearing 7GB.

Without restarting the game, I left it on overnight (less total time, about 6 or 7 hours) just sitting in a Falx and it did this:

https://drive.google.com/file/d/1OwzFXr ... sp=sharing

Very peculiar. I don't know why a game that is running but not being interacted with would use more memory than one in which you move around. Of course it may not even be the same issue others are having since for me this does not happen during normal gameplay, but it at least shows there are cases when it can use so much memory.

This is a save I made just before restarting the game to keep it from inadvertently melting something. It won't have that usage on load but maybe someone at Egosoft will want to leave it idling or something to see what horrors unfold:

https://drive.google.com/file/d/1-rdeG_ ... share_link

edit: I should mention the map was open, both times it did this.
***modified***

User avatar
chew-ie
Posts: 5599
Joined: Mon, 5. May 08, 00:05
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by chew-ie » Sun, 16. Apr 23, 01:05

LameFox wrote:
Sun, 16. Apr 23, 00:56
chew-ie wrote:
Sat, 15. Apr 23, 17:51
Mmmh... so staying in the highway ring might help reproduce that quickly?
After playing all saturday my RAM usage was only nearing 7GB.

Without restarting the game, I left it on overnight (less total time, about 6 or 7 hours) just sitting in a Falx and it did this:

https://drive.google.com/file/d/1OwzFXr ... sp=sharing

Very peculiar. I don't know why a game that is running but not being interacted with would use more memory than one in which you move around. Of course it may not even be the same issue others are having since for me this does not happen during normal gameplay, but it at least shows there are cases when it can use so much memory.

This is a save I made just before restarting the game to keep it from inadvertently melting something. It won't have that usage on load but maybe someone at Egosoft will want to leave it idling or something to see what horrors unfold:

https://drive.google.com/file/d/1-rdeG_ ... share_link

edit: I should mention the map was open, both times it did this.
Interesting obvservation. I couldn't detect more RAM usage in my extreme KE sessions (vacation! :D) as well. Never exceeded 8 GB - so there must be something special to it. Seems you have found one way to reproduce it - hopefully the devs can have a look.

Although - they use longterm simulations to test various stuff, which also might not have user interactions.

Tbh - if it is only affecting "[Sinza] credit generators" I'd say it's a low priority problem.

Image

Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!

:idea: Pick your poison seed [for custom gamestarts]
:idea: Feature request: paint jobs on custom starts

Radamanthe Nemes
Posts: 77
Joined: Tue, 1. Mar 11, 21:02
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by Radamanthe Nemes » Sun, 16. Apr 23, 01:33

LameFox wrote:
Sun, 16. Apr 23, 00:56
I don't know why a game that is running but not being interacted with would use more memory than one in which you move around.
As a living world, ships entering your current sector may allocate some resources periodically (models, textures...). If the leak comes from that, it may be the cause instead of your repetitive jumps into new sectors which, even if promptly triggering a lot more allocations (add cubemaps, stations...), could remain bug free by itself.

LameFox
Posts: 2406
Joined: Tue, 22. Oct 13, 15:26
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by LameFox » Sun, 16. Apr 23, 01:38

chew-ie wrote:
Sun, 16. Apr 23, 01:05
Tbh - if it is only affecting "[Sinza] credit generators" I'd say it's a low priority problem.
This actually did not have SETA running, either time. I don't like to use it for that long in case it messes things up.
***modified***

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Sun, 16. Apr 23, 04:00

LameFox wrote:
Sun, 16. Apr 23, 00:56
chew-ie wrote:
Sat, 15. Apr 23, 17:51
Mmmh... so staying in the highway ring might help reproduce that quickly?
After playing all saturday my RAM usage was only nearing 7GB.

Without restarting the game, I left it on overnight (less total time, about 6 or 7 hours) just sitting in a Falx and it did this:

https://drive.google.com/file/d/1OwzFXr ... sp=sharing

Very peculiar. I don't know why a game that is running but not being interacted with would use more memory than one in which you move around. Of course it may not even be the same issue others are having since for me this does not happen during normal gameplay, but it at least shows there are cases when it can use so much memory.

This is a save I made just before restarting the game to keep it from inadvertently melting something. It won't have that usage on load but maybe someone at Egosoft will want to leave it idling or something to see what horrors unfold:

https://drive.google.com/file/d/1-rdeG_ ... share_link

edit: I should mention the map was open, both times it did this.
Interesting, I have been playing for 3+ hours now, and I'm now hitting 12gb, but for the first 2 hours I was using 7-8gb.

I keep playing for a bit longer to see if I can hit the magic full ram, and report back.

LameFox
Posts: 2406
Joined: Tue, 22. Oct 13, 15:26
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by LameFox » Mon, 17. Apr 23, 01:21

LameFox wrote:
Sun, 16. Apr 23, 00:56
edit: I should mention the map was open, both times it did this.
Turns out the map is blameless in this, I tried it again with the map closed just standing on a station and got 20GB this time.

It's interesting that it gets higher every time. I'm not leaving it for longer. Maybe as my save matures it happens faster?
***modified***

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Mon, 17. Apr 23, 03:19

I agree it's not to do with the map or travailing etc, @LameFox are you using steam? As it happened again last night after 8-9 hours, with the last 2–3 hours just letting the game run with me afk, but when it happened this time I closed X4 and opened taskmanager and Steam was hogging 85% of my ram, so I checked to see if any traces of the game was still running in taskmanger, but it was clear.

I changed my GPU to a RX6700xt yesterday, so I had to clear out the drivers with DDU, and as I was at it, I reinstalled the rest of the drivers, I also let MemTest run for 10 hours and found no problems.

One more strange thing that happened was my GPUs V-Ram increased over time along with the PC's memory usage, for the first 2-3 hours I was using just 6-8GB of V-Ram but after 9 hours it also hit max V-Ram of 12GB, I don't know if this was a problem with the 8GB 580 installed, as I was not displaying all the stats then.

I saved a DXDiag, and there wasn't any error reports in event viewer, and as it's a new Young Guns start I don't have SETA yet, still having problems getting vulkaninfo.

LameFox
Posts: 2406
Joined: Tue, 22. Oct 13, 15:26
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by LameFox » Mon, 17. Apr 23, 03:25

I am using steam yes. However I have not seen steam itself using excess resources.
***modified***

H34Dru5H
Posts: 16
Joined: Sat, 18. Feb 06, 03:49
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by H34Dru5H » Tue, 18. Apr 23, 02:12

I'm having the same problem since 6.0 upgrade, 16Gb RAM usage is maxing out after a couple hours of play. One blessing is a save game now loads really quick, so I quit to desktop and restart the game and all is well again, but it's not ideal to be fair. I'm sure those nice devs are aware and working on it :)

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Wed, 19. Apr 23, 11:50

I have fixed the problem, but steam may not agree with how I have fixed it, and I really think Egosoft really needs to sort this problem out with Steam, as I don't know if it's an egosoft or steam problem as it's only happening in 6.0, and not 5.1 for me, or any other game I have in steam or anywhere else.

After hitting max memory usage in X4 6.0 I closed the game to find 50+ instances of "steam client webhelper" showing in Taskmanager, using 85% of my 16GB of ram,
So I started googling this problem and found a workaround on Steam from 3 years ago, so I made the changes to Steams files to remove them by basically renaming them, I tried all the suggested changing Steam settings on that thread and others, but it made zero difference, the only thing that I have found to work is by changing the names of the files called "webhelper" and locking Steam out of changing the files back or making new ones, I have linked the Steam thread below, and you need to read the post #32 by "Haru".

The things I have tried before, getting to a point to need to do this.
Reinstalled Windows 10 with all latest drivers

Reinstalled Steam plus a clean installation of X4.

Fitted a different set of ram, 16GB 3200mhz, and combined both sets of ram for 32GB and still ran out of memory, Ran MemTest for 10 hours with zero errors.

Changed my GPU 3 times 3080 10GB, 580 8GB, 6700XT 12GB.

Some people in the steam thread claim having loads of webhelper's showing in is from opening too many web browsers, which is pointed out is not true, and I don't even use my gaming PC for internet things, only gaming, I even don't have it connected most of the time, only when updating driver etc, and being on or offline makes zero difference to this problem before some asks.

I'm not saying anyone should try this, but it has completely fixed my problem in X4 6.0, 16 or 32GB or memory usage down to 8-9GB, also when starting Windows I noticed 14 instances of this steam webhelper showing in taskmanager using 3GB memory and 5-9% of the CPU, but I have regained it all after doing this fix.

This is what webhelper is meant to do:

"This is intentional. The steamwebhelper.exe helper program, like Chrome, has started using multiple processes for security and stability purposes. If one process crashes, it doesn't take down the entire client; that process just restarts. Likewise, if someone finds a security hole in our website or in the helper's Javascript engine, that exploit might be able to take control of one process - but only one process, and it wouldn't have access to data stored in other processes (like passwords for other sites).

Also note that the total RAM used by these processes is not as high as it appears at first, because the processes share memory with each other. The total RAM is not the same as the sum of all the individual processes. It's difficult to examine exactly how much is shared at any given moment, unfortunately."

https://steamcommunity.com/discussions/ ... 034/?ctp=3

User avatar
izalith
EGOSOFT
EGOSOFT
Posts: 247
Joined: Mon, 15. Apr 19, 17:25
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by izalith » Thu, 20. Apr 23, 12:45

hardergamer wrote:
Wed, 19. Apr 23, 11:50
so I made the changes to Steams files to remove them by basically renaming them
Hello, can you provide which files you renamed? While it's probably not recommended to do so, this information might help to check the cause for memory leaks if we have a repro case.

hardergamer
Posts: 34
Joined: Sun, 10. Apr 11, 13:04
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by hardergamer » Fri, 21. Apr 23, 08:51

No problem, and it's nice to see you are very active :)

In the main Steam X86 folders bin file open the cef file to find cef.win7 and cef.win7x64, it's in both files, and it's the "steamwebhelper.exe"
I could not find a way to add the file to this post? Edit, I think I did.

I ran the game for 22 hours and vram did still increase, but only to 12GB, and the game has had zero stutters etc, this is with max settings 1440p

Steam did an update this morning and added one of the steamwebhelper files back in the cef.win7 folder, but I have had zero problems with the files showing in taskmanager, or any problems when in the game, and it seems Steam and my game are both working well, was the problem fixed?

https://drive.google.com/file/d/1T8dulX ... share_link

Kenjiro
Posts: 18
Joined: Mon, 24. Dec 18, 15:31
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by Kenjiro » Fri, 21. Apr 23, 20:56

Hi hardgamer,

I haven't this problem, but some thoughts. If the webhelper is the reason for this, what happens if you disable the Steam Overlay for X4?
From my unterstanding without the overlay there should be no reason for an instance of the webhelper for X4.
Maybe this would be a much lesser agressive solution. ;-)

Shakh1942
Posts: 3
Joined: Fri, 7. Dec 18, 12:32
x4

Re: Memory increses over time, Leak? New Game 6.0

Post by Shakh1942 » Sat, 22. Apr 23, 00:29

I do have the same Error but i play the GoG version and version 6.10 with the Multiverse beta, the game runs fine until it hits the like 98 percentile systemmemory + page file in my case 16gb ram and like 12gb windows page file. I increased windows page file and the game runs stable longer but is hammering my SSD to oblivion with writes.

My solution at the moment is to run HWinfo and setting an alert if "Virtual Memory Load" Usage exceeds >= 75% so i can save and restart the game.

Hope there's a fix someday don't really like windows page file thingy.

Post Reply

Return to “X4: Foundations - Technical Support”