X4: Foundations

X4: Foundations

View Stats:
wizofid May 20, 2023 @ 6:35pm
Out of virtual memory
I notice some old threads on this, but wanted to mention that at least in my gameplay I slowly run out of physical and virtual memory over the course of a long play session. My current save is at 15d 10h played. I noticed my 32 GB was running low, but it seemed fine. Eventually though x4 crashed and this what is in the system log:

Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: X4.exe (428) consumed 71821991936 bytes, NortonSecurity.exe (5284) consumed 664162304 bytes, and GCC.exe (7388) consumed 365486080 bytes.

That is 72 GB. I rebooted, reloaded the save and memory is sitting at 9.5 GB . I have the process explorer running now and I will keep an eye on it over long sessions.

BTW - I really love this game. Something about the mix of spaceflight, building and strategy is extremely engaging!
< >
Showing 1-12 of 12 comments
Rooter May 20, 2023 @ 6:47pm 
Your last sentence lines up with my question.
Why did I only get this game 2 weeks ago?
Ryno May 20, 2023 @ 6:58pm 
Wow, I have never seen that kind of usage. Are you running mods? It sounds like something besides the base game is eating up your memory.
S.C. May 20, 2023 @ 7:08pm 
It seems like a memory leak problem. If you are playing vanilla game, you can report to Technical Support in egosoft official forum.
PeaceMaker May 21, 2023 @ 4:32am 
Talking about memory leaks I sometimes get a very starnge thing when my game quits. Just quits. No error, no thing. All gone, like a candle in the wind.

This only seems to happen if I choose a custom game and pop in a random number.

I wondered if that was a memory leak thing, but I do have a LOT of memory.
Steve May 21, 2023 @ 5:10am 
Try a utility called Intelligent Standby List Cleaner. It's a game changer for memory intensive games.
Once it's set up, I just run it on pc startup and it deletes any large unused memory blocks from ram.
S.C. May 21, 2023 @ 5:18am 
Originally posted by PeaceMaker:
Talking about memory leaks I sometimes get a very starnge thing when my game quits. Just quits. No error, no thing. All gone, like a candle in the wind.

This only seems to happen if I choose a custom game and pop in a random number.

I wondered if that was a memory leak thing, but I do have a LOT of memory.

It seems OS killed your game process for some reason. Allocate too much RAM, unhandled exceptions, etc. Only devs can help to figure out the true root cause.
Last edited by S.C.; May 21, 2023 @ 5:18am
PeaceMaker May 21, 2023 @ 5:42am 
Originally posted by S.C.:
Originally posted by PeaceMaker:
Talking about memory leaks I sometimes get a very starnge thing when my game quits. Just quits. No error, no thing. All gone, like a candle in the wind.

This only seems to happen if I choose a custom game and pop in a random number.

I wondered if that was a memory leak thing, but I do have a LOT of memory.

It seems OS killed your game process for some reason. Allocate too much RAM, unhandled exceptions, etc. Only devs can help to figure out the true root cause.

It doesn't happen enough to really be an issue, on a reload it just carries on fine.

It's just very strange. X4 is the only game I have that just 'puffs' out, no fault code, nothing. Just gone! PC carries on fine on the Desktop. Sometimes I look to see if it's minimised maybe. Nope. No other game acts like this when it crashes.
Last edited by PeaceMaker; May 21, 2023 @ 5:44am
wizofid May 22, 2023 @ 10:52am 
So I downloaded process explorer and kept track of memory usage. I notice that each time I teleport to a new location since game start it costs about 1GB that is never given back:

Game start: 9.5gb
1 hour: 12.7 gb
2 hours: 16 gb
3 hours: 20 gb
4 hours: 22.1 gb
6 hours 24.5 gb
8 hours: 25.6 gb

This is with mostly active playing and mostly trying to push Xenon out of Tharka's cascade. When I take breaks I pause the game. I do not let it run attended since the last time I lost a giant fleet.

Then I restarted and it went back to 9.5 gb. I don't think is a big issue at all. Just restart the game every 8-10 hours or so!
Last edited by wizofid; May 22, 2023 @ 10:54am
Azrelus May 22, 2023 @ 11:33am 
Originally posted by wizofid:
This is with mostly active playing and mostly trying to push Xenon out of Tharka's cascade. When I take breaks I pause the game. I do not let it run attended since the last time I lost a giant fleet.

The worst thing you can do is go AFK in an X game.

Whenever I did in X3, I came back to a gameover screen.
Ryno May 22, 2023 @ 11:42am 
Originally posted by wizofid:
So I downloaded process explorer and kept track of memory usage. I notice that each time I teleport to a new location since game start it costs about 1GB that is never given back:

Game start: 9.5gb
1 hour: 12.7 gb
2 hours: 16 gb
3 hours: 20 gb
4 hours: 22.1 gb
6 hours 24.5 gb
8 hours: 25.6 gb

This is with mostly active playing and mostly trying to push Xenon out of Tharka's cascade. When I take breaks I pause the game. I do not let it run attended since the last time I lost a giant fleet.

Then I restarted and it went back to 9.5 gb. I don't think is a big issue at all. Just restart the game every 8-10 hours or so!

This is good info for sure. As was asked above, are you running any mods to the game? Mods are known to at times cause extra memory usage.
Ryno May 22, 2023 @ 11:51am 
Originally posted by PeaceMaker:
Talking about memory leaks I sometimes get a very starnge thing when my game quits. Just quits. No error, no thing. All gone, like a candle in the wind.

This only seems to happen if I choose a custom game and pop in a random number.

I wondered if that was a memory leak thing, but I do have a LOT of memory.

You could try opening your Windows Event Viewer, do a search (Find...) for x4.exe under the Applicationl logs to see if there is a reason for your crashes. I just searched my logs and found a single crash on May 1st where it did something similar to you.
Log:
Fault bucket 1708506323992996523, type 5
Event Name: RADAR_PRE_LEAK_64
Response: Not available
Cab Id: 0

Problem signature:
P1: X4.exe
P2: 6.0.0.0
P3: 10.0.22621.2.0.0

A quick Google search for the Event Name shows the following explanation:
RADAR is Microsoft's Memory Leak Detector so that error indicates an App/program is not properly handling memory.

So there could very well be some kind of memory leak issue in the main game. I haven't had a crash since this time but it could explain some of the issues ones are finding. So many changes to the game engine in v6 that there could be something running out of control eating up memory.

Further Google search post finding indicate it could be related to Video card drivers as well. It also seems to happen to those of us running Nvidia cards.

These are all observations that can be looked at.
Last edited by Ryno; May 22, 2023 @ 11:55am
Zimur Jun 5, 2024 @ 2:34am 
Originally posted by wizofid:
So I downloaded process explorer and kept track of memory usage. I notice that each time I teleport to a new location since game start it costs about 1GB that is never given back:

Game start: 9.5gb
1 hour: 12.7 gb
2 hours: 16 gb
3 hours: 20 gb
4 hours: 22.1 gb
6 hours 24.5 gb
8 hours: 25.6 gb

This is with mostly active playing and mostly trying to push Xenon out of Tharka's cascade. When I take breaks I pause the game. I do not let it run attended since the last time I lost a giant fleet.

Then I restarted and it went back to 9.5 gb. I don't think is a big issue at all. Just restart the game every 8-10 hours or so!

This problem is far more worse with Steam Deck. At least for me it is not about hours I play, but how many times I jump between sectors.

When the resource indicator on the top of the screen show that the RAM usage is close to or already is 13 gigabytes, and the VRAM is about 4.5 gigabytes, it is time to save and exit the game to reset the memory usage. Very annoying.

I hope this problem will be fixed for the 7.0 update.
< >
Showing 1-12 of 12 comments
Per page: 1530 50

Date Posted: May 20, 2023 @ 6:35pm
Posts: 12