Alpha 21 under Linux

Hello there,

I’m a huge fan of the game and was happy to see that it will eventually come to Linux. Then, I couldn’t wait any longer… :grin:

I’ve tried to run the game with Wine or PlayOnLinux before, but always ran into some problem or other…
Now though, with Wine 2.4 staging (things seem to work almost flawlessly)! This post is meant to (a) show other users how I went about running Stonehearth, and (b) to document the problems I encounter.

Setting up

Getting a recent Wine version
I’m on a 64bit Linux Mint, which is based on Ubuntu. I followed a post on OMGUbuntu (Wine 2.0.1 Stable Released, Here’s How To Install it on Ubuntu - OMG! Ubuntu!) to get a recent version of Wine. These are the terminal commands I needed:
sudo apt-add-repository 'Index of /wine-builds/ubuntu
wget && sudo apt-key add Release.key
sudo apt update && sudo apt-get install winehq-staging
Now, when you enter
wine --version
in the terminal, it should show version 2.4 (or, if you read this in the future, something above that).

I then simply downloaded the Stonehearth ZIP, unpacked it into a folder, and started the /Stonehearth.exe with Wine (starting the /x64/Stonehearth.exe has the same result for me).

How’s it running?

The game starts smoothly and without fault for me. I either simply double-click on the Stonehearth.exe or open a terminal in that directory and launch it via
wine stonehearth.exe
The latter method has the benefit of giving me error messages from within Wine. I immediately get an error which I ignore, which is
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth = 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
(I ignore this, because I believe ntlm_auth is needed for authentication with other services, and SH doesn’t need that.

Issue 1: Too many open files

After some time playing, Stonehearth will no longer accept button presses for me. The game runs on, hearthlings build and I can move the camera, but neither clicks nor button presses register. This includes Esc and F5 (to reload the UI). Nothing works.
Accompanying this, Wine complains that there’s too many files open: I somehow feel that Stonehearth opens all kind of LUA files, maybe, and doesn’t close them anymore?
Failed to create thread
fixme:virtual:NtQueryVirtualMemory (process=0xffffffffffffffff,addr=(nil)) Unimplemented information class: MemoryWorkingSetList
wine: Unhandled exception 0xe0000008 in thread 55 at address 0x7b450cba (thread 0055), starting debugger...
err:winediag:FILE_CreateFile Too many open files, ulimit -n probably needs to be increased

On Linux, you can set the number of allowed open files with the command ulimit. To check how many files any process can open, enter „ulimit -n“. For me, it was 1024. If I raise that number before I start Stonehearth, I can play for longer. If I lower it, I can’t play at all. It seems that Stonehearth has a lot of files open.

Issue 2: Assertion failed

Sometimes (I don’t know when exactly) the game crashes with the error „assertion failed“.
After that, any attempt to load a save results in the same crash.
Assertion Failed: c > 0 && c < ReadBufferSize(C:\rb\ihome\root\SH-OB0-BUILD\stonehearth\source\include\protocol.h:142)
However, if I reboot my system, I can then load normally… which is very strange. Some temporary file seems to be the problem, and after the reboot that file is gone. This is all the insight I can offer regarding this.


Thank you for your efforts man. I’m sure many will appreciate it!

About this, I’m not sure what would count as an open file, because most files in game are images or text .json files. But in total the game has over 8000 files! (no memes intended)

1 Like

Hi Bruno!

Yeah, I hope the effort pays off - both in that other people might get it running, and also maybe these linux-specific issues help finding bugs/ leaks regardless of platform.

I’ve now increased the limit even further by entering an absurdly high amount in the limits.conf
sudo gedit /etc/security/limits.conf
In that file, I’ve added something right before the # end of file.

* hard nofile 500000
* soft nofile 500000
root hard nofile 500000
root soft nofile 500000

This seems excessive, but as a proof of concept it was very insightful. No more unresponsive UI! :slight_smile:

I assume the main difference is new WINE version, and not so much Stonehearth itself. Still, I’m very happy that I can now play somewhat decently (performance is still meh, but at least I finally got to the blacksmith!).

1 Like

Hello, I a big fan to, but I can’t play in ubuntu 18.04.1 do you now what can i do ???

Hiya @Dann7101,

You could try this:


hello, thanks, I will try thank you

1 Like