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

badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

I can see the process. I run a lot of different stuff however. Steam overlay is off watching resource monitor I can see that Windows is behaving normally regarding memory. I am running 16 gb of which only gb is used by the system. Essentially I am watching the allocation realtime as I play. I have a browser up streaming resource monitor and the game.
I don't see any hd writes to the page file until the sytem allocated memory climbs up to 80%. I manually set my page file to limit its size. Even when just playing x4 the Process is just growing more and more. No other pid's are realtime grabbing memory. I see my ssd IO shoot up once x4 starts chomping memory. I will say I was playing this for a long time without issues the first time it happened x4 had 64 gb of memory and my hd filled up for the first crash. The strange thing is the game will still run if I ignore the no more memory error though things are quite broken. I can't get a debug out cause my guess is there is more ram to allocate the report output too.

There are no other PID's grabbing memory even while stream my browser doesn't pull more. It could end up being an issue with windows but there's not much pointing to anything else right now. This isn't a low memory warning my system is completely tapped out resulting in every running program crashing because. Before hitting the error the system show 28 gb of ram allocated so its 16 GB of ram plus all of my page file. I decided to quit to main menu and reload my save and that didn't release any memory it only gets release when x4 is quit to desktop. If it was another program I should see another PID getting that ram no host process or other running process is being given memory. .
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

CBJ wrote: Fri, 16. Jun 23, 09:19 Just to reassure you that we're not ignoring this report, and that any additional info is still valuable.
I have the switch on the application executable to generate the report. However the report tool crashes too. If I close the game normally will it generate a report. Is there a way to crash the game to force it to output something.
KalisaFox
Posts: 175
Joined: Sun, 4. Aug 13, 05:58
x4

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

Post by KalisaFox »

I'm not sure if im getting a leak of some kind but I have been noticing since coming back to the game in 6.0 that after about 2-3 hours my frames start to suffer by about 10-15% and that increases the longer a session goes on, in allot of sectors after a 4-5 hour session il notice my frames stable at about 45-50 and then il restart game and be back up to 90 for awhile again, not really seeing an increase in ram but not sure where else i could be looking for whats causing the slow down, thankfully its an easy fix for me with just restarting every 3-4 hours to keep things running smoothly though.
If it helps i can also post my dxdiag, in general running an i7-12700, and have 32GB of ram, my cpu and ram are far from cap, even on a single core, so not sure the slow down.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

If you want to know you can open resource monitor in windows. Go to memory and sort by committed X4 should be on top and you can see how much memory is assigned. If you don't know how open task manager, click on performance, In the top right hit the three dot menu and hit resource monitor. Then you will want to pay attention to memory and hard drive. At this point with my page file limited to 10 gb and having 6gb of ram I can only game for around an hour. So whatever is causing it is getting worse. I suspect because I am starting to build more and more ships.
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

EGOSOFT any update on the Memory Leak issue?

I've recently bought the Kindom End expansion and been playing extensively the past week and have several time now had my game suddenly crash due to the exact issue most people are describing in this thread.

My system specs are as follows:
CPU: Ryzen 7 5800X3D
RAM: 32 GB 3600 CL18
GPU: AMD 6900XT - running Adrenalin v23.5.2
Note: I have disabled Windows ability to create a "pagefile" - data file that acts as additional memory stored on the storage drive. With 32 GB of system memory a "pagefile" is unnecessary and would only lessen the systems performance if it has to use it.

When I say extensive play I mean 5+ hours, sometimes by accident - falling asleep while game keep chucking along, then at some point the game practically freezes with no visual reasons as to why, where I have to open the windows Task Manager before I can see the error popup window, see here

and clicking "OK" in the error popup directs me to Exitcode 1113 wikipage.

DXDIAG file can be seen here
CBJ
EGOSOFT
EGOSOFT
Posts: 54300
Joined: Tue, 29. Apr 03, 00:56
x4

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

Post by CBJ »

Metran wrote: Wed, 21. Jun 23, 09:33 EGOSOFT any update on the Memory Leak issue?
If there were an update, you'd see it posted here. Asking isn't going to make anything happen more quickly. ;)
Metran wrote: Wed, 21. Jun 23, 09:33 I've recently bought the Kindom End expansion and been playing extensively the past week and have several time now had my game suddenly crash due to the exact issue most people are describing in this thread.
Just because the symptoms are similar, that doesn't necessarily mean it's the same issue. Please indicate whether or not your game is modified and, if unmodified, provide a savegame in one of the situations where it has happened to you.
Metran wrote: Wed, 21. Jun 23, 09:33 Note: I have disabled Windows ability to create a "pagefile" - data file that acts as additional memory stored on the storage drive. With 32 GB of system memory a "pagefile" is unnecessary and would only lessen the systems performance if it has to use it.
With respect, this could in principle be exactly what's causing the problem in your case. Windows has a pagefile system for a reason.
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

CBJ wrote: Wed, 21. Jun 23, 09:53 With respect, this could in principle be exactly what's causing the problem in your case. Windows has a pagefile system for a reason.
If you look at the screencapture I took of the Task Manager you can see that my system memory usage is only 24GB out of 32GB - so it has nothing to do with having a pagefile or not, if it did it would most likely read 100% usage on system memory when the error occured. When I reloaded the game after the crash the games memory usage were only around 9.5GB allocated (at the time of crash error popup read ~14GB?)
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

CBJ wrote: Wed, 21. Jun 23, 09:53 Just because the symptoms are similar, that doesn't necessarily mean it's the same issue. Please indicate whether or not your game is modified and, if unmodified, provide a savegame in one of the situations where it has happened to you.

My game is unmodified, see here and here, and currently have 5D 12H 31M into this save (according to the ingame statistics). Save file can be downloaded here
Other metrics - Windows resource monitor (save game reloaded)

That being said, it takes several hours before game supposedly runs out of memory.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

So everything seems fine as far as the game isn't unstable. The game is only going for about an hour before I have to save and exit. It does not seem to be getting worse. What started the issue is I went on a vacation and left the game idle. I left it running for like 3 days which I am used to be doing with this game. I came home and the computer was completely hard locked because the game had grabbed 65 gb of pagefile and filled the drive. After that incident the last save game worked and nothing appeared to be wrong. Maybe its because the universe wasn't mature yet. I don't know. After that though the max session time went from 4-5 hours slowly down to about an hour. I did notice a single npc ship docked at my station. It's been there and has not moved. It is a buccaner ship and at first thought it might be a venture ship as it was listed as JP morgan knife. I noticed that the ship has been docked at the station for over two weeks. When I do guidance to object it looks like it is in interior storage but if I do guidance to object I get taken to a spot above the docking bay dead center of it. There is a target there I can target and shoot at it but there isn't collision. I tried marking it as hostile to try and get it to react or do something and doing that has no affect. I can't kick it out of the station. I attached the image. This is the only thing ODD I have noticed so far. I am trying to think of a way to crash the game while there is enough memory left to get a usable debug while its eating up memory.

https://i.imgur.com/nmAeNB7.jpeg

link to save File
https://drive.google.com/file/d/1wbIHJM ... drive_link
Last edited by Terre on Thu, 22. Jun 23, 07:34, edited 2 times in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

The 'JP Morgan Knife' ship belongs to the teladi npc of the VIG/Northriver plot. You find that the npc is, most likely, in the Science room along with Bosa Ta and Dal Busta. The fact that the ship has been docked for weeks is unrelated to memory leak issue.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

The biggest factor in determining the game link is travel. I know this details seems dumb as the more sectors the more you load in. I added 100 transports to the game but that has not seemed to affect the playtime. I mean would expect that as I go into a sector certain things load into memory. I would assume that after leaving a highly populated sector and being out of that sector for some time that some of the memory should be returned from committed.

Note I am speaking of system ram not graphics memory. I do see a few hundred meg of memory leaving which seems like the game keeping up with tasks and such. I just can't find a pattern Other than sector traversal that is consistent. The game will still crash after an hour and 45 or so if I just play the game from the map while docked in a station in a very isolated sector.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

Just wondering if the save file is helpful is something else needed. It sucks not being able to just leave the game running while I am at work.
Imperial Good
Moderator (English)
Moderator (English)
Posts: 4933
Joined: Fri, 21. Dec 18, 18:23
x4

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

Post by Imperial Good »

If you have a not modified save that can reliably reproduce the leak, meaning that the devs could load up the save, wait X hours without user interaction and there will be some ridiculous/unexpected amount of memory used after that period, then that might be helpful.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

Imperial Good wrote: Fri, 23. Jun 23, 16:30 If you have a not modified save that can reliably reproduce the leak, meaning that the devs could load up the save, wait X hours without user interaction and there will be some ridiculous/unexpected amount of memory used after that period, then that might be helpful.
I posted a link to the save already it's like three posts up. It is an autosave that is producing the problem and is unmodified. There is a google link in the post
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

Imperial Good wrote: Fri, 23. Jun 23, 16:30 If you have a not modified save that can reliably reproduce the leak, meaning that the devs could load up the save, wait X hours without user interaction and there will be some ridiculous/unexpected amount of memory used after that period, then that might be helpful.
I'll attempt to do some testing during this weekend and hopefully it will help. I have already done 2 test, recorded Game, Win Task Manager and Win Resource Monitor, one being ~12 hours long (mostly AFK, rarely interacting with the game) and another one roughly 4 and a half hours long playing the game more or less as I normally would. In both these cases the game did not crash, however the game did accumulate an absurd amount of Allocated Memory (39GB) in the 12+ hours session and System Memory usage read around 23GB ram. As I closed down the game System Memory usage quickly dropped back down to my systems idle usage, which is around 7GB, which means that the game were using upwards of 16GB of System Memory - although the Process itself only ever, reported, using around 6.5GB memory.

:!: All Recordings provided below are recorded using OBS v29.1.3 - Open Broadcast Software.

24.06.23 Update - Test 1: 12½ hours of mostly inactive gameplay

Game Version: 6.1
Game Start: Untested Explorer
Game Mod(s): None - unmodded
Did game crash? It did not.
Recorded Video (DL): Download Here (15.4GB)

24.06.23 Update - Test 2: 4½ hours of active gameplay

Game Version: 6.1
Game Start: Untested Explorer
Game Mod(s): None - unmodded
Did game crash? It did not.
Recorded Video (DL): Download Here (5.5GB)

Description: 4½ hours of [active] gameplay with windows Task Manager and Resource Monitor overlayed on top of the game client - such that the System, Process and Allocated Memory can be monitored at all time (only momentarily Alt-Tabbing to the Task Manager to switch to 'Processes' to record the memory usage of the X4.exe process) - after which I have extracted data related to memory usage and inputted it into a Excel spreadsheet to create the following graph.

Just as described above these updates, the reported memory usage of the X4.exe process does not change that much over the span of gameplay - roughly between 5.5 to 7.5GB of ram usage. System Memory however - while it does fluctuate a little bit - does slowly accumulate higher and higher ram usage, though not at the same rate as Allocated Memory usage does. From loading the (save) game to exiting, the game does steadily and significantly accumulates allocated memory usage, eventually to the point where there are no more available memory to allocate (and/or windows' 'PageFile' has reached it's allowed size limit).
Last edited by Metran on Sat, 24. Jun 23, 13:02, edited 4 times in total.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

Metran wrote: Fri, 23. Jun 23, 20:32
Imperial Good wrote: Fri, 23. Jun 23, 16:30 If you have a not modified save that can reliably reproduce the leak, meaning that the devs could load up the save, wait X hours without user interaction and there will be some ridiculous/unexpected amount of memory used after that period, then that might be helpful.
I'll attempt to do some testing during this weekend and hopefully it will help. I have already done 2 test, recorded Game, Win Task Manager and Win Resource Monitor, one being ~12 hours long (mostly AFK, rarely interacting with the game) and another one roughly 4 and a half hours long playing the game more or less as I normally would. In both these cases the game did not crash, however the game did accumulate an absurd amount of Allocated Memory (39GB) in the 12+ hours session and System Memory usage read around 23GB ram. As I closed down the game System Memory usage quickly dropped back down to my systems idle usage, which is around 7GB, which means that the game were using upwards of 16GB of System Memory - although the Process itself only ever, reported, using around 6.5GB memory.
This is my experience as well.
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

Updated my post above with some new details as well as providing video recordings.
Metran
Posts: 234
Joined: Thu, 6. May 10, 03:57

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

Post by Metran »

Ran a 3rd test yesterday loading up save game and then let it run until game crashed, eg. runs out of system memory and thus throws an error. I setup my recording software and then booted up game and loaded into my save game, the recording did not record the actual "error message" due to lack of memory (duh..). Game ran for about 19 hours before System could not provide anymore memory.

Download video here (22.8GB).
Mr.Freud
Posts: 325
Joined: Sat, 16. Nov 13, 20:20
x4

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

Post by Mr.Freud »

I have the same issue. After couple hours, game uses ~24 GB of Ram and stuttering occurs sometimes.
badbane
Posts: 127
Joined: Tue, 29. Oct 13, 07:27
x4

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

Post by badbane »

It does not appear to be related to ship count or total objects as I have 300 ships now in game but the time to memory being filled up remains the same.

Return to “X4: Foundations - Technical Support”