Memory Leak as reported from Steam

Started by Imagix, February 13, 2024, 09:40:27 PM

Previous topic - Next topic

Imagix

Hi, I'm the person who talked about a memory leak in Particle Fleet eventually resulting in the program just up and quitting without any opportunity to save the game.  Attached is the output log, as requested.

I'm running an NVidia 1080ti with v551.23 of the game ready drivers.  That's got 11GB of dedicated video memory.  Windows 11.

Karsten75

Thank you for uploading this. A few things check out, a few things don't. 

You indeed have a 2024 Nvidia driver. 
You do indeed have a GTX 1080To 

However, the log shows the VRAM as 3072MB 

QuoteDirect3D:
    Version:  Direct3D 9.0c [nvldumd.dll 31.0.15.5123]
    Renderer: NVIDIA GeForce GTX 1080 Ti
    Vendor:   NVIDIA
    VRAM:     3072 MB (via DXGI)
    Caps:     Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 INTZ=1 NULL=1 RESZ=0 SlowINTZ=0

This is again confirmed a little later, when your Windows version is also identified as Windows 10

QuoteAlienware Aurora R8 (Alienware) Desktop
NVIDIA GeForce GTX 1080 Ti NVIDIA Direct3D 9.0c [nvldumd.dll 31.0.15.5123] Graphics Memory:3072
Windows 10  (10.0.0) 64bit

I'm wondering if perhaps the game misidentifies the Windows version, since it was written before Windows 11 was available.

I've reached out to the developer.

There are a number of messages of this nature:
QuoteOut of bounds particle: -3,65
 

Various coordinates in the large number of similar messages.

The final crash occurs on a graphics exception in DirectX. My initial suspicion was that it was in the GPU, but on closer examination it may not be. I'm still confused about the discrepancy in reported VRAM and the VRAM you believe you have installed, this may also be some issue with the game, again, I have asked the developer.

Here is the final exception:

Quoted3d: failed to create 2D texture id=10223 w=320 h=352 mips=9 d3dfmt=21 [out of memory]
DynamicHeapAllocator allocation probe 1 failed - Could not get memory for large allocation 1048576.
DynamicHeapAllocator allocation probe 2 failed - Could not get memory for large allocation 1048576.
DynamicHeapAllocator allocation probe 3 failed - Could not get memory for large allocation 1048576.
DynamicHeapAllocator allocation probe 4 failed - Could not get memory for large allocation 1048576.
DynamicHeapAllocator out of memory - Could not get memory for large allocation 1048576!
Could not allocate memory: System out of memory!
Trying to allocate: 1048576B with 16 alignment. MemoryLabel: STL
Allocation happend at: Line:75 in
Memory overview

[ ALLOC_DEFAULT ] used: 75725028B | peak: 0B | reserved: 92228528B
[ ALLOC_TEMP_JOB ] used: 0B | peak: 0B | reserved: 3145728B
[ ALLOC_GFX ] used: 917807087B | peak: 0B | reserved: 1189430787B
[ ALLOC_CACHEOBJECTS ] used: 64976B | peak: 0B | reserved: 10485760B
[ ALLOC_TYPETREE ] used: 0B | peak: 0B | reserved: 0B
[ ALLOC_PROFILER ] used: 0B | peak: 0B | reserved: 0B
[ ALLOC_TEMP_THREAD ] used: 31248B | peak: 0B | reserved: 3145728B
Could not allocate memory: System out of memory!
Trying to allocate: 1048576B with 16 alignment. MemoryLabel: STL
Allocation happend at: Line:75 in



knucracker

So the log shows an errors trying to allocate a texture.  The 3072MB of vram reported by unity is "correct".  Correct in that particle fleet is a directx9 game and directx9 can only access 4GB of VRAM (which results in the 3072MB 'usable' number).  There are only 4 instances of a mission load in that log file, so I reckon one (or both) of two things might be going on. 

One could be the loading of some custom map that has a lot of stuff in the map. This would require a whole lot of stuff, though.

The other is that something else on the system is using a lot of VRAM.  There could be something else (another game,  video editing software, screen capture software, AI, etc) using up a  bunch of VRAM.

I'd do a full reboot then take a look at vram usage in the windows task manager prior to running the game. Then start the game up and see what happens to usage

Imagix

Thanks for looking at this issue.  No, no other significant programs running at the same time.  Just Particle Fleet and Steam.  Plus a normal collection of other background things (Dropbox, that sort of thing).

Oh, my.  Just browsing the carousel, and it crashed in a similar manner.  Attached.

Karsten75

Really, you're not the only person playing Particle Fleet. We have no other reports of memory leaks. Here is an image I took just now of my GPU with a game active in PF:E 
 

Note the VRAM is around the 2GB mark and the utilization on my much weaker GPU is really low.

The issue has to be something on your machine. You may want to monitor the VRAM using a utility such as HWINFO64 or similar both when running the game and when not running the game.

Imagix

Seems to nearly reliably crash if all I do is go into the Exchange, filter on not played, or in progress, and just rapidly go forward 30 pages.  The program shows it's on page 30, and all of the thumbnails are blank (I presume still loading from the network.  Reasonable thing).  However, the game doesn't ever catch up and just crashes.  The other change I did was to change the window resolution down so that I could watch the task manager while PF:E is playing.   During this time, the GPU's dedicated memory did not climb above 1GB usage.  Main CPU doesn't go above 25%, and the GPU hangs around the 20% mark.

I would hope I'm not the only person playing PF:E.  And I also play far more graphics-demanding programs than PF:E on here.  Not that I'm ruling out that there's something different on my machine than everybody else's.

Karsten75

The last update to Particle fleet was in January of 2017.  There are still a lot of people actively playing it and uploading maps to prove the fact. There has been an uncountable number of plays of the game between 2017 and now. 

You are the only person reporting this issue.  

Tomorrow I will ask the dev if he could share how many new scores has been uploaded to the PF:E database in the past few days. That is the only metric we have apart from the continuing sales of the game to show that there is still an active player community. 

I would  recommend that you start by checking that you don't have perhaps malware that uses your GPU for crypto mining (one idle thought of mine).  That, or your GPU could be overheating (when last did you clean dust out of the case?) or any one of a number of issues. 

I recommended HWINFO64 to give you detailed insight into VRAM, temp and utilization of your GPU. 

Other than that, we don't have any advice or insight into what the issue might be. I'm sorry. 

I will say that there is a rather drastic departure between the first log where you claimed you played to 1.5 - 2 hours and nw suddenly you crash on the carousel screen. Which is in fact not very resource-heavy at all. 


Karsten75

@Imagix
QuoteTomorrow I will ask the dev if he could share how many new scores has been uploaded to the PF:E database in the past few days. That is the only metric we have apart from the continuing sales of the game to show that there is still an active player community.

I did ask the developer. We don't keep track of how many players play, but we did see that there were at least 250 scores uploaded in 24 hours between yesterday and today. That does not factor in all those who played and did not submit a score.

So this would make it highly unlikely that you alone have hit a situation in-game that cause a memory leak, has gone undetected since 2017, and still eludes the majority of players.

I do hope you get this sorted and if you ever do, please post back and let us know what was the cause. Maybe that one day helps someone else.

Imagix

Great, I'm the only person reporting the issue.  I've never claimed that this is widespread amongst the user base. Only that it happens enough during gameplay that it doesn't seem to be a one-off issue.

I put in HWINFO64.  Nothing in there appears to go wild.  Maximum temp only hit 44 degrees where the thermal limit is up at 84.  The Fan barely changes.  Core load peaked at 40%.  Memory usage at 22%.  Max memory allocated at just below 2.5GB.   This was during the carousel browsing (skip forward 30 pages).

I agree that it is surprising that it crashes during browsing the carousel.  But it's one more piece of symptoms.  I tried to hit the forward button slower (ie: wait for all of the thumbnails to display before advancing), and it failed on the 30th page.  Drew about the first half of the thumbnails.


Karsten75

@Imagix

Does the game always crash for you in the Carousel? Does it crash in-mission as well?

If it only crashes in the Carousel for custom maps, we have identified a possible cause. Unfortunately, the game is too old to be fixed as the game project is not supported by any current Unity development environment.

The only workaround is to view the custom maps in the Grid form.

Imagix

I guess I've misspoken a little.  I am looking at the Exchange in Grid mode, not Carousel.  The game does crash in-mission, but after a fairly significant amount of time (over an hour), and not reliably.

Ah well, I do understand aged software.