Large Memory Leak

xvi_0616 shared this bug 23 days ago
Reported

Placing grids in a large plane results in a large memory leak.

- Video shows what happens in Task Manager

Replies (12)

photo
2

[Edit on 01/30/25]

Sorry for not leaving specific details of the game build and everything. The game build when this bug is happening is the first release build and this current build (0.12.23.32).

-------------------------------------

PC Specs:

i9-11900k (no overclock) on z590m

RTX 4090 (no overclock)

DDR4-3200 (CL16) (XMP Enabled)

1tb WD 2.5 SATA SSD (where game is stored at).

-------------------------------------

Description:


- The memory leak pretty much happens with all blocks in a large quantity. 2.5cm, 50cm, and 25cm.

- The amount of blocks varies, from a little as maybe 10 blocks to a couple of hundred.

- The leak can also happen when you partial copy and/or copy the blocks.

- It would freeze the game, but not crash it, when the massive memory leak happens.

- The leak can and will use an excess amount of ram, even excess of 100gb of ram without any sign of stopping.

- There are still much more sources of memory leaks, but currently everything is causing leaks...from duplicating ships to duplicating simple blocks (Image Source: "stonelords" on Discord)image

photo
3

I also get this memory leak too. It's a major one and easy to reproduce on my PC. I had the game using up to 45gb of my 64gb of my RAM.

Trying to copy the grid I built caused the game to lock up and freeze. I had to force close the game with task manager to be able to get control of my PC again.

-------------------------------------

PC specs:

Intel I7-12700KF Desktop CPU.

64GB RAM DDR5 at 5600Mhz.

Gigabyte RTX 4070TI Overclocked.

-------------------------------------

photo
1

Here a video as well of me starting a new world and causing it.


Intel I9-9900k

32GB DDR4 2400Mhz Ram

Nvida Geforce Gtx 1060

photo
1

Here a video as well of me starting a new world and causing it.


Intel I9-9900k

32GB DDR4 2400Mhz Ram

Nvida Geforce Gtx 1060

photo
1

Got it to Burst up to 32GB and then it has been slowly normalizing. Made 6 or so large Plates and it Lagged hard on the last one.

game stabilized at 26GB then dropped significantly after a few minutes to. well its still going, its running back to baseline round 13GB.

It seems less like a Full blown Mem Leak and more like slow garbage collection. which on slower RAM can cause leakage. but this seems more like a lot of data being parsed, again I had to make 6 platters of 2.5m blocks to get any game effecting results. This still could be considered an issue but its more along the lines of there's a ton of new blocks let just open the RAM up.


Def still not happy about it capping out my RAM. The Recommended is 16gb Please save some RAM for my Audio interface so I can hear the game, not an issue but that has happened in other games for me.

2f57d9b7a8db757c2e3ea74403863e88

Each Plateau is a New Platform and it stays up there for and slowly decreases as the blocks get put in storage after say 10 TO 15 MINUTES GOT DAMN, it dropped back to 14.1GB7d57717fdd6bec4c7337e27f67364549

Clearly loading out chucks to disk and SLOOOOOWLY garbage collecting like 1GB every minute. will admit the amount of data is seeming like a mem leak. But how much data should be there, is this normal it RUNS at 12 to 14GB and it may just be allocating that space for block positions, still that's a lot. We need some sort of RAM usage analysis done.

AMD 5800x 4.45Ghz

32GB DDR4 3200Mhz Ram

Nvidia RTX 3040 TI

Samsung 980 Pro NVMe

photo
1

As long it didn't cause problems I would say: RAM is there to be used. But when I read here some comments it cause trouble, so better they should fix it asap.

photo
photo
1

9700x with 32gb of ddr5 @8ghz

Can confirm, placing blocks in planes causes a leak, and also gets exponentially worse in mirror. My ram usage does return to normal after a while. Also, game can continue as normal while the allocation is out of control, but I don't think this is a true "leak". I think it's just over allocation from trying to process more than it is supposed to. I think it is iterating over every block in the grid with every block it is attempting to place. My reason for thinking this is because 2000 blocks on a mirror placement will take 20 times longer than 2000 blocks alone and a single block will not really do anything at all, but it does "feel" chunky when it is placed.

photo
1

Update on 02/01/25

The issue still exists, and the leaks seem to get significantly worse the larger the grid becomes. For my instance here, placing a couple of lines of blocks shoots up many GB of ram (in video posted below).

- The issue becomes VERY severe to the point where the game freezes between 5-15 minutes when placing down a plane of 2000 blocks at a time and CAN use a very ludicrous amount of ram.

image-47Screenshot_2025-01-29_103138

photo
1

Any similarity to my post? Crash reports indicate memory leak but characteristic copy and paste causes damage across the grid prior to crash

https://support.keenswh.com/spaceengineers2/pc/topic/45992-space-engineers-2-all-blocks-receiving-damage

photo
1

I copy pasted around 100 red ships and I had to wait a good chunk of time for the memory use to go down from 32gb to 28gb

photo
2

Hello xvi_0616,


issue has been reproduced and submitted into our internal system (SE2-21821).


Thanks for you report.


Best regards,

Keen QA Support

photo
1

I had a thought about this. Is the system adding an "undo/redo" for every single block during a paste/planes function? Is each block generated iterating through every other block in the grid with a process before being placed?

These are the two things I suspect.

photo
1

I did have the same problem, I made a section of a ship so easy can extend it to build it, around 20.000 blocks.

I could't past multi sections of it, because system memory fills up and feezing the game.

photo
photo
2

This is fixed in the latest update. Thanks Keen!

photo
1

Seems fixed on my end as well.

Leave a Comment
 
Attach a file