Game breaking bug, freezes time and saving

Summary: Game stops time and disables saving when a pop and cheer sound effect plays.

Steps to reproduce:

  1. Open up save file (attached)
  2. Wait for night time, and listen for the cheer pop sound effect

Actual Results:

You are still able to move the camera around and interact with things in the world, but all the hearthlings are frozen. Once you try and save the game, it will freeze all the UI too.

Notes:

  • This is a multiplayer sever
  • This is being played in “The Ascendancy”

Attachments:

Video Evidence

Save File and File Generated on Savegame

Version Number and Mods in use:

Stonehearth 1.1.0 (release 949) x64 build

Mods: Northern Alliance, Rayya’s Children, Stonehearth, Radiant Core Library

System Information:

Intel i7-8700k
NVIDIA RTX 2080
Windows 10

If you need more information, just let me know!

This is false.

After some investigating, I found that this happens only when a building is finished.

1 Like

yeah, the pop and cheer sound is the standard “construction complete celebration.”

Every time a building is completed, the game has to re-calculate the terrain region around it (this info is used to speed up and simplify pathfinding), which is pretty processor-intensive… it may simply be that your computer is reaching its limits of how much it can do at once when it’s calculating this info. It’s especially likely if you’re building large or complex buildings – bigger buildings are likely to cross multiple regions (think of them like chunks in Minecraft – imagine building a redstone contraption that covers multiple chunks and causes all of them to be updated at the same time) and thus create a lot more work for the computer when it has to update them.

One useful trick I’ve found is to break medium to large buildings up into rooms or sections, which are built as separate buildings. There are a bunch of benefits, although the main one is that the game only has to figure out one section of the building at a time rather than having to process the whole thing – which makes it easier and faster to build the sections too. Another major benefit is that if the building is targeted by Gary’s building-crusher tentacles, they’ll only knock down one section (assuming you don’t stop them first), so you won’t e.g. lose your entire town wall in one blow!

In the meantime, to reduce the impact of your issue I’d recommend keeping an eye on the building construction, and pausing the game when it’s nearly finished. Wait for the “resource monitor” bar (the brightly coloured bar in the bottom-right corner that’s changing colours and looks a bit like a graph – because it is one lol) to go almost fully green, and then let the game run; when the bar fills up with blue pause the game again and let the computer process all that blue, and so on. The game will still probably freeze when the building is completed, but it won’t have as much other stuff on the “waiting to be figured out” list at the time, so the freeze should be shorter and there should be less chance of any calculations getting lost/stuck during that time (which is what causes the “hearthlings are idle even though there’s work to do” situation – that’s a sign that the computer is too overloaded with calculations to figure out what the hearthlings should be doing.)

Another good habit to get into is to take frequent breaks, and not leave the game running for hours at a time. The amount varies based on different computers, but the longer the game runs the more “junk” builds up in its memory, and even though the game tries to clean up junk data wherever possible there’s some stuff that it never considers safe to delete/clean up. Also, when saving and exiting the game I like to pause it first, which seems to make it save more quickly, and more importantly it loads back in more smoothly because the game can load everything up and then re-start the simulation rather than trying to load everything + keep the game running at the same time.

Yeah, I thought this was a bug because yesterday it was working just fine and today it does this thing.

It especially weird because I can still move around in the game but nothing works. I also looked at the CPU usage and its barely anything, its something like 30%, which is normal for any running game.

Yeah, but its weird because I’m only building the template builds like shared sleeping quarters and dining halls.

Thanks for the suggestion! I’ll be using this for the time being.

Yeah I’ve been having this problem also.

Yeah that may add onto it. Sometimes I like to play this game hours at a time because its so relaxing.

Thanks for putting so much time into your reply! Thank you so much and happy new year!

It’s worth pointing out: Stonehearth runs something like 80% of the game in only one of the processor’s cores; so having a large multi-core processor doesn’t always help as much as you’d think. The reasons for this are complicated, but the simple/short version is this: splitting up the simulation to use multiple cores in parallel is an absolute mess, since the difference cores/threads wouldn’t know what the other ones are working on at the time… your computer would spend as much time figuring out what’s happening with each calculation as it would with actually solving them. So using a single core is actually faster for how this program runs; and sadly, the technology to make it run well across multiple processor cores doesn’t really exist at the moment. Other kinds of games can easily separate their information to make it “thread safe” i.e. the calculations are done in a way that it doesn’t matter which thread does them, or certain threads handle certain areas of the game so that the computer doesn’t get confused… but because of how inter-connected everything is in Stonehearth, there’s no good way to do that for this game.

This is why a lot of people see visible signs of “processor overload” even though the game or their computer is reporting that their processor is barely working… the truth is that most of the cores in their processor actually aren’t doing anything, and one is completely overloaded trying to do everything.

Hence my constant broken-record refrain of “break big jobs up into smaller jobs” and “try to make things as simple as possible” – the computer has basically no ability to simplify the workload for itself; and even though most of the time that’s what we imagine computers being really good at doing (i.e. multi-tasking or storing lots of things in memory so it doesn’t have to solve the same problem over and over again)… the rules are a bit different here because the computer can’t guarantee that the answer is the same as the last time it solved that same question.

Happy New Year to you too, and here’s hoping that 2020 holds a lot of fun with Stonehearth :merry:

1 Like

I understand this, but its so weird because the last time I played which was around April, I had no problems with this, and I was on the same exact system.

I really only use prefabs so breaking up building tasks doesn’t seem to work for me.

Quick question, is this happening to you, since you know how to fix it?

This problem seems to have come up before here:

Looks like it was patched before…

I’ve had times where the game was choppy, or where saving took considerably longer than you’d expect. Some of them were during much earlier versions, before optimisation was applied; and some were in the current release when I was intentionally pushing the limits to figure out what my computer can handle. When I catch it happening these days, I pause the game and take a look around for anything that’s stuck (e.g. a task which hasn’t been completed in ages, enemies which are stuck trying to get to the town, a huge pile of items that isn’t being stored away, or something else that’s “not being finished”), because 9 times out of 10 it’s related to something I haven’t been paying attention to which has been building up/getting stuck because the game can’t figure it out (or I simply forgot to tell it to do one of the steps hahah.) EDIT: oh, and the other 1/10 is simply because I’ve built my town/save game up too big for my computer to handle.

I don’t really “know” how to fix the specific cases of lag because a lot of the time there’s not one simple cause, but a whole web of factors. Sometimes you can isolate “the straw that breaks the camel’s back”, and sometimes you just have to do what you can and hope that it’s enough. All the suggestions/recommendations around reducing processor load are based on the premise that any reduction to that load is probably going to help, even if it doesn’t eliminate the major cause… and a lot of the time, the biggest issue is simply that the processor is just full so it doesn’t really matter what you’re reducing (e.g. less buildings, less items to keep track of, less AI to run or whatever) as long as you free up enough space for the processor to do its calculations smoothly again.

That thread you’ve linked looks like a textbook example of “computer memory too full” – notice the resource monitor bar down in the bottom right-hand corner of the game screenshots? It’s completely filled up with blue (Lua – i.e. most of the game, things like keeping track of the game world and buildings and events and so on), pathfinding, and whatever “filter cache” is.

I haven’t had a chance to look at your save game, but I’m going to take a wild guess and say there’s a lot of blue and/or bright blue in the resource monitor bar? That’s usually what I get when the game starts to get laggy or freeze up on saving for me.

So, this is a screenshot of the resource bar:

image

So during the freeze, the bar is completely blue. Since the game is frozen, I can’t take a screenshot of it. Its the light blue which is the “lua” option on the resource monitor.

I mean I just started that save game but its still consuming a lot of memory…

Alright, so, I just found out that this game is pretty much abandoned… I still love the game, but I feel there is no point to continue the thread until I find a solution.

I really appreciate your time to everyone who participated on the thread @YetiChow @Wouter_Sikkema

Similar thread list:




So you’re getting the bar filled up with blue on a newly-started town? Or is it that you’ve only just loaded back into a save which you’ve been working on for a while previously, and it’s immediately filling up with blue?

If it’s the latter, it probably means you just have a LOT going on in that town, and the computer is struggling to keep track of it all. All the usual advice about reducing CPU load would help you, if that’s the case – e.g. cut down on the amount of tasks being done at any one time, clean up items into storage wherever you can, cut down on the production of unnecessary items (crops are usually a big culprit here – early on you need a lot of them, but as your town gets more advanced you cook better recipes and your farmers will grow things faster so all that raw food starts to pile up because it’s not being used anymore… easiest thing to do then is to shrink your fields, sell off the excess raw food to traders, and try to find the new balance of how much food you need to produce to avoid overstock.)

It might be worth looking at the More Map Options mod for its smaller world size, too – 80% of players don’t fill up even half of the normal map size when they play, but using a smaller map makes a dramatic improvement to how much work your CPU has to do. Plus you can add rivers, control things like the dirt patches (some people hate them lol), and even try out the “sky lands” variant map, so it’s a fun mod to try out anyway :merry:

1 Like

So like I can make a new world with nothing in the game and build something and just freeze the game. That’s the problem. The game is really just unplayable for me. I thought I had a really good system because big games like GTA 5 run really well, but I guess because this game is CPU intensive, its not gonna work out for me.

Intel i7-8700k
NVIDIA RTX 2080
Windows 10

Your hardware should run the game fine
I have the same cpu but in a laptop
Uninstall the game, manually delete all leftover files and reinstall
It may fix your problems

There are different kinds of “big” games – a game like GTA 5 is probably a reasonable benchmark for processing power (honestly it’s one of the few times I’ve seen the “my computer can run [insert major game franchise] so it should run this fine” arguments where the game compared to is even remotely comparable), but ultimately the two games still work very differently.

That said, what you’re describing isn’t a simple “beyond the limits of your hardware” problem because that situation of the game freezing up when construction completes isn’t normal – particularly when you’re building one of the vanilla templates.

A clean install may help, and another thing that may help is running the game as administrator.

Are you getting any crash logs/errors in your game log? You can find it in the Stonehearth folder – there will be a clearly marked crash report file, and a “stonehearth.log” which is written any time you play the game and records everything that happens (so even if you have no major errors/crashes you can use that log to track down minor error pop-ups or whatever)

1 Like