Memory Leak in Release-663

Summary: Game runs fine for a while, but the RAM usage slowly grows until it eats up all available RAM.

Steps to reproduce:

  1. Start up game
  2. Play for a few hours

Expected Results: RAM usage balloons until it has taken up all available RAM.

Actual Results: RAM usage doubled during a 3-4 hour play session

Version Number and Mods in use: release-663 x64

System Information: i5-2500K OC 4.0 GHz, 8GB RAM, Nvidia Gtx 1070

Hey there @Brandon_Benitez_link, welcome to the Discourse :smiley:!

Can you please confirm if you’ve changed any settings in your user_settings.json? The save game where this is occurring would also be useful - we don’t usually see a game fill 8 GBs of memory in just a few hours.

To upload a save, locate the folder in C:\Program Files (x86)\Steam\steamapps\common\Stonehearth\saved_games (assuming a default Steam install), zip the individual save’s folder (not the entire saved_games folder), and upload it. If the *.zip is less than 10 MB, feel free to upload it directly to the Discourse. If larger, please upload it to a cloud storage site like Dropbox, Google Drive, File Dropper, etc. and post the sharing link here.

hello good day to you. I understand this issue seems pretty bothersome. I too had issues with the game taking up all available ram with in just a few hours. I could not have any other program open or the system would freece up. I have accepted this happening from an alpha game. I just save reguarly and restard every 2 or 3 hours. I also lowered my graphic settings a bit. This has helped allot.

Yea noticed same thing game sucks up 14-18 gigs of memory after a few hours.
(mine was normally around 8 gigs on load)

And i noticed a certain areas in my save game that in particular produces very low frames.
And nothing special in the area.

Hi @Psyduck,
Would you mind sharing your save? 8GB on load is probably the highest I’ve encountered to date (it’s hard to get my hands on extremely large saves) so I’d love to diagnose it.
Thanks
-Yang

2 Likes

Ill upload my save aswell in a few days when Elforia is finished. Yesterday after prox 3 hrs also unable to do much. (Saw blue blocks like in custom building lowest floor design spawn randomly over the map) after game restart the problem was fixed again

Sure here’s the latest save game…uploaded a pic as well, where i marked the area i noticed the game running worse in.

https://drive.google.com/open?id=0B7Sa8ogmH3qhSzVnM3FybWdTUzA

the startup error is being looked at i think.(brad said chris was looking at it) its caused by the large castle and if you remove it and make a new save that error goes away. but memory load still seems pretty high.

1 Like

Hi all
A relative newbee here so forgive me if I’m bringing up old stuff but I have similar problems. I have an 18 gig memory machine with 4trb of disk space, half of which is available to the page file memory and 4x 6 core AMD 4gb processors with a Nvidia GTX560 graphics card. So ok the Graphics card probably lets the system down a bit however, I’ve seen worse lol

Anyway, I get the same thing, It starts with 4 to 6 hours of game-play and then the game just grinds to a halt. In the old days of programing it would have been compared with the I/O bus filling up and not dumping. Anyone over 40 will probably know what I mean haha … so as Ii start to mine for minerals and build those templates that are supplied with the game, that 4 to 6 hour time span shortens considerably until it is counted in minutes rather than hours.

My fix has also been, save the game, exit, leave it until Stonehearth no longer appears in the ‘running programs’ list in application manager and then restart and she runs fine again for a short while. however, I now have 33 Hearthlings, 4 standard ‘living quarters’ one workshop for each of the trades except farming and hunters, a church and an Inn and she refuses to take any more, I can restart the game now and it will play for roughly 10 minutes before grinding to a halt with total lag out.

I have assumed this is something that is to be expected from an alpha game but as my lad reminded me, If it goes unreported, the developers won’t know so here it is folks, I’ll leave it in your obviously more than capable hands. :slight_smile:

1 Like

@yshan might need to take a look at this one too
http://www.filedropper.com/1475065170332

Your save loads fine on my machine, took barely anytime at all, only thing that happened on load was this error when it loaded:

release-663 (x64)[M]
stonehearth/lib/build_util.lua:361: assertion failed!
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
[C]: in function 'assert’
stonehearth/lib/build_util.lua:361: in function ‘can_start_blueprint’
…earth/components/fabricator/fabricator_component.lua:816: in function ‘_start_project’
…earth/components/fabricator/fabricator_component.lua:605: in function ‘_updates_state’
…earth/components/fabricator/fabricator_component.lua:594: in function 'obj’
radiant/modules/events.lua:83: in function 'instance’
radiant/modules/events.lua:291: in function <radiant/modules/events.lua:285>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:285: in function 'trigger’
radiant/modules/events.lua:398: in function '_trigger_gameloop’
radiant/modules/events.lua:446: in function '_update’
radiant/server.lua:62: in function <radiant/server.lua:58>

release-663 (x64)[M]
…hearth/components/scaffolding/scaffolding_region.lua:692: assertion failed!
stack traceback:
radiant/modules/common.lua:237: in function 'report_traceback’
radiant/modules/common.lua:248: in function <radiant/modules/common.lua:242>
[C]: in function ‘assert’
…hearth/components/scaffolding/scaffolding_region.lua:692: in function ‘_set_scaffolding_self_destructed’
…hearth/components/scaffolding/scaffolding_region.lua:600: in function ‘_remove_dead_dependencies’
…hearth/components/scaffolding/scaffolding_region.lua:578: in function 'update_anti_dependents’
stonehearth/components/scaffolding/scaffolding.lua:449: in function '_process_self_destruct_changes’
stonehearth/components/scaffolding/scaffolding.lua:409: in function 'fn’
radiant/controllers/nonpersistent_timer.lua:56: in function 'fire’
radiant/controllers/time_tracker_controller.lua:82: in function <radiant/controllers/time_tracker_controller.lua:82>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/controllers/time_tracker_controller.lua:82: in function 'set_now’
radiant/controllers/time_tracker_controller.lua:103: in function 'increment_now’
radiant/modules/timer.lua:13: in function 'instance’
radiant/modules/events.lua:291: in function <radiant/modules/events.lua:285>
[C]: in function 'xpcall’
radiant/modules/common.lua:257: in function 'xpcall’
radiant/modules/events.lua:285: in function 'trigger’
radiant/modules/events.lua:398: in function '_trigger_gameloop’
radiant/modules/events.lua:446: in function '_update’
radiant/server.lua:62: in function <radiant/server.lua:58>

I know it loads in quick. It gets slower after few hours

Just another thing i wanted to add. Been having the game idle in windowed mode for bit more than an hour now.

And memory load stays the same then. So i would guess the memory leak is related to building mechanics

tried having the game running with the ingame time running for an hour and that was around 1500 megs of load for that and seems stable around 9,5 gigs in my case

`Could be, yesterday i was building and i got all randomly selected blue cubes spawning on the map

Here is the link for my save game: Stonehearth Saves (Support) - Google Drive

As for my settings, I increased all graphics options to maximum, toggled on full-screen mode, and toggled on auto loot, the auto-build construction queue, and the extra speed option.

1 Like

I also forgot to mention that I have the auto-save function turned on as well.

A post was merged into an existing topic: [BUG] Repeating error in any game