Hotfix 0.6.4.43 / 0.7.0.3
As I mentioned on Saturday, a series of memory leaks came to my attention last week that ended up being quite elusive. This patch addresses 99% of those leaks and some problems with the game hanging in the event of an attempted multi-player connection timing out.
A memory leak is when a section of memory gets allocated for use but then doesn't get properly unallocated, leaving it in limbo and unrecoverable. Unity games are primarily written in C# which is a modern programming language that has a wonderful tool called a garbage collector that watches objects in memory and automatically unallocates them when it can tell that no one is using it anymore. The internal workings of Unity however operate using C++ which is another similar programming language that does not use a garbage collector. This means that certain types of objects being handled internally have to be managed manually.
Unfortunately, Unity's tools for monitoring memory usage are convoluted at best. I ended up making my own tools after almost 20 hours of struggle with little progress to show for it all. After finally figuring out what types of objects were lingering around in memory it was only a matter of time before I squashed them, one by one. There are still some tiny leaks, 100kb's when you return to the main menu kind of small things, but nothing compared to the problems that were crashing the BKG California dedicated server almost daily most of last week.
What initially got me looking deeper into the problem was actually measuring the performance of a number of different operations to see what the main cause of the lagg spikes that can cause the mouse to spin are. I have some strong leads on 2-3 different systems that I can improve and spread out over time to decrease those spikes that I plan to work on in the near future.
With the BKG server crashing due to the memory leaks there were also instances where I would try to connect to it through the game client and the connection would time out, but the "unable to connect" warning wasn't triggering, leaving the client stuck in "connecting". I've improved that code to be more informational about what's going on, and not get stuck any longer.
I've applied this patch to both beta and live simultaneously.
v 0.6.4.43 2020.10.26
- Fixed several memory leaks causing the game to slow down over time
- Fixed multi-player connection issues causing the game to get stuck "loading"
(beta)
v 0.7.0.3 2020.10.26
- Fixed several memory leaks causing the game to slow down over time
- Fixed multi-player connection issues causing the game to get stuck "loading"
You may need to restart Steam for the update to begin.
To opt into Beta you only need to go to your Steam Library, right-click on Solace Crafting, select Properties, click on the Beta tab, and opt-in to the beta.
Join us in Discord! Interested in supporting development of Solace Crafting? Please consider becoming a patron via Patreon!
A memory leak is when a section of memory gets allocated for use but then doesn't get properly unallocated, leaving it in limbo and unrecoverable. Unity games are primarily written in C# which is a modern programming language that has a wonderful tool called a garbage collector that watches objects in memory and automatically unallocates them when it can tell that no one is using it anymore. The internal workings of Unity however operate using C++ which is another similar programming language that does not use a garbage collector. This means that certain types of objects being handled internally have to be managed manually.
Unfortunately, Unity's tools for monitoring memory usage are convoluted at best. I ended up making my own tools after almost 20 hours of struggle with little progress to show for it all. After finally figuring out what types of objects were lingering around in memory it was only a matter of time before I squashed them, one by one. There are still some tiny leaks, 100kb's when you return to the main menu kind of small things, but nothing compared to the problems that were crashing the BKG California dedicated server almost daily most of last week.
What initially got me looking deeper into the problem was actually measuring the performance of a number of different operations to see what the main cause of the lagg spikes that can cause the mouse to spin are. I have some strong leads on 2-3 different systems that I can improve and spread out over time to decrease those spikes that I plan to work on in the near future.
With the BKG server crashing due to the memory leaks there were also instances where I would try to connect to it through the game client and the connection would time out, but the "unable to connect" warning wasn't triggering, leaving the client stuck in "connecting". I've improved that code to be more informational about what's going on, and not get stuck any longer.
I've applied this patch to both beta and live simultaneously.
v 0.6.4.43 2020.10.26
- Fixed several memory leaks causing the game to slow down over time
- Fixed multi-player connection issues causing the game to get stuck "loading"
(beta)
v 0.7.0.3 2020.10.26
- Fixed several memory leaks causing the game to slow down over time
- Fixed multi-player connection issues causing the game to get stuck "loading"
You may need to restart Steam for the update to begin.
To opt into Beta you only need to go to your Steam Library, right-click on Solace Crafting, select Properties, click on the Beta tab, and opt-in to the beta.
Join us in Discord! Interested in supporting development of Solace Crafting? Please consider becoming a patron via Patreon!