[1.19n][bug/crash] mem usage when load

I "always" exit and start clean when I want to reload a game, because I have heard of problems, but this time I decided to measure said issues.  I know someone did this before, but I haven't seen a recent posting, so....

The general sequence was:  start game,  load a quicksave, note memory usage, handles & threads without doing anything, load and note, etc, until bored.  Then save an "after" save and try to exit, except it OOMed on me while exiting.

              Peak memory      handles     threads

Start          653,804               595        32

load 1        799,598               630        31      (why would threads decrease ?)

load 2        907,188               640        31

load 3      1,035,724              644        31

load 4      1,152,436              649        29

load 5      1,269,628              647        27

(load 5 was measured after a pause of several minutes while I gave my cat an affection fix.  I could swear the "handles" as 650-something and changed just as I turned back to the screen.  When I jiggled the mouse a bit, handles when up to 653)

load 6     1,387,500               656       27      (watched it a while and handles dropped to 655)

Bored, exit, OOM.

This was playing max-sized map, 1920 x 1080 full screen, with task-manager running on a 2nd monitor.

 

Original quicksave        http://dl.dropbox.com/u/8928343/QuickSave-mem-check.EleSav

"after" save                 http://dl.dropbox.com/u/8928343/after-mem-check.EleSav

debug.err                    http://dl.dropbox.com/u/8928343/debug-mem-check.err

crash zip file                http://dl.dropbox.com/u/8928343/Elemental1_19n-2011-04-22T17-43-36-703.zip

 

FWIW, in a test a few minutes earlier (starting the exact same quicksave)  peak memory started at 654,124, handles was 592, and threads was 30 after the initial load.  So it isn't even consistent at the start.  I'm not posting the rest of that test because I think I invalidated it by doing other stuff in between loads.

 

    

1,392 views 1 replies
Reply #1 Top

Nice work! I think the load a game from within a game OOM issue is due to the garbage collection process not picking up all the memory garbage left over from the previous game (from what I've read up on memory leaks). From reading various posts I think Derek and team know of this issue but it's going to be a post 1.2 fix, possibly with a revamp of how all memory is handled.

But nice analysis! :beer: