[0.8] MP Memory Leak (Critical Bug)

Discussion in 'Multiplayer' started by Masakari, May 20, 2018.

  1. Masakari

    Masakari Well-Known Member Most Ingenious

    @Adriano @Sammi

    Critical Bug I found by chance playing in the current 0.8 stable. No clue if it was in previous unstables due to various reasons (hosts leaving or internal crashes and the like).

    Memory/ram will increase until it maxes out both your motherboard and GPU (@Zed found out about the GPU as he has a more extensive system checker/watcher than standard task manager which I was using and explains why my screen went black).

    The rate of increase is proportional to the player count. @Zed and I did some tests today and just us it was an average of 0.3-0.6 mb per sec/tick. Once more people started showing up (4-6) it climbed to 1-1.5 mb per sec/tick.

    Links to his streams showing the memory/ram increase along the bottom. The most recent 4 are the videos to look at. https://www.twitch.tv/zedyes/videos/all

    Yesterday when I was in 12-16 player games the rate of increase was 5-10mb per sec so I was able to only play about 20 minutes or so each time (12 gb ram). My comp froze up 3 times and had to do a hard forced comp shutdown (holding power button).

    We could not figure out what could be causing it.

    Memory would reset to baseline when I quit to the main menu so I can reset it to prevent the freeze at least.

    Logs added if that might have caught something.

    Zeds output Logs. Link to all 4 as they are too large for some reason. https://files.fm/u/j82pc6gw#_

    Attached Files:

  2. Zed

    Zed Well-Known Member

    During more standard multiplayer sessions this memory leak was less of an issue than the lack of buffering / synchronization to accommodate the wildly varying internet connection speeds of players as demonstrated during the middle rounds of Sunday's matches ( https://www.twitch.tv/videos/263543954 ) where at times it was impossible to even place blocks along with other odd damage "catch up" where fully hp'ed techs were instantly destroyed as part of batch catchups...

    Regarding the memory leak, I somehow suspect it is tied to the game timer and the movement of each tech being recorded into Ram without it being purged to help keep memory usage down; perhaps a "cache clear" after 120s past could ameliorate this memory leak.
    Masakari likes this.
  3. kae


    Thanks for the reports guys, we'll take a look into this issue, hopefully we can get it sorted as soon as we can.

    In the meantime, can you/or anyone else who gets this crash in multiplayer also post your DxDiag for us to have a look at please?

    *Edit* - Update!
    Think we got this one now, it was due to the steam avatars reloading every second and not freeing up memory it used.

    You guys should have a fix soon!

    Last edited: May 21, 2018
    Zed and Masakari like this.
  4. Zed

    Zed Well-Known Member

    Thank you all for your prompt effort in resolving this multiplayer bug. As requested a copy of the streaming rig's dxdiag is included below.


    There still seems to be a slight memory leak in the mp module though it is very minor; other notes would be that if I return to my game's lobby to modify settings I cannot restart the match with the revised settings and am permitted to return to the current settings awaiting a rematch. (lack of UI) mem test streams : https://www.twitch.tv/videos/264092575 / https://www.twitch.tv/videos/264075730 +log included

    Given that free to try week is about to begin perhaps this specific fix should be retroactively applied as a hotfix to the 0.8 stable branch to improve the guest players collective experience while previewing TerraTech. (not to mention cut down on the number of bug reports generated for an already-resolved issue.)

    Attached Files:

    Last edited: May 22, 2018
    Masakari likes this.

Share This Page