Quote Originally Posted by zootal View Post
So I load a 16K local SP world, mem consumption goes up to about 16GB as expected. Exit, join a server, which is running a 15K world. Memory consumption goes up to about 24GB . Open console, type mem. Nothing happens.

Exit server, reload that SP map I was running before, mem goes up even more.

Am I doing this right? I issue "mem" in console while in game, nothing happens. Memory consumption remains high, does not drop at all.

If I exit the SP world and I'm just at the game menu, open console, type mem, I get:

2019-05-26T13:04:17 539.965 EXC Object reference not set to an instance of an object
NullReferenceException: Object reference not set to an instance of an object
at ConsoleCmdMem.FillStats (Boolean _bDoGc, .GameManager _gm) [0x00000] in <filename unknown>:0
at ConsoleCmdMem.GetStats (Boolean _bDoGc, .GameManager _gm) [0x00000] in <filename unknown>:0
at ConsoleCmdMem.Execute (System.Collections.Generic.List`1 _params, CommandSenderInfo _senderInfo) [0x00000] in <filename unknown>:0
at SdtdConsole.executeCommand (System.String _command, CommandSenderInfo _senderInfo) [0x00000] in <filename unknown>:0
*** ERROR Executing command 'mem' failed. Object reference not set to an instance of an object.

I'm guessing you can't/shouldn't issue "mem" if not in a world/server?

I do see this in the log:

Unloading 3112 unused Assets to reduce memory usage. Loaded Objects now: 330173.
Total: 1316.578000 ms (FindLiveObjects: 19.129000 ms CreateObjectMapping: 4.948000 ms MarkObjects: 1279.057000 ms DeleteObjects: 13.443000 ms)

I'm wondering if it thinks it needs most of the assets, and therefore does not unload them?
That memory use seems very high to me. Maybe Linux/OpenGL is not handling textures well? Uncompressing them?

I fixed the mem command error when a world is not loaded in A18, but that fix is not in A17.

After the mem command runs, in the log you will see:
2019-05-25T20:33:12 284.350 INF Time: 2.00m FPS: 92.59 Heap: 321.7MB Max: 321.7MB Chunks: 441 CGO: 227 Ply: 1 Zom: 1 Ent: 2 (2) Items: 0 CO: 1 RSS: 2660.2MB

RSS: xMB is the total memory being used.