It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi everyone, I just downloaded and installed Stardew Valley on Ubuntu 20.04.3 LTS. I used the wizard, which worked, and changed permissions on start.sh to be able to run it.

When I run start.sh (or game/StardewValley), it says "running Stardew Valley" but then encounters a fatal error before anything gets displayed. Here is the error message:
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) <0x41d9b3b0 + 0x00127> in <filename unknown>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) <0x41d9b1f0 + 0x00127> in <filename unknown>:0
at System.TermInfoDriver..ctor (System.String term) <0x41d9a140 + 0x00193> in <filename unknown>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) <0x41d9a100 + 0x00027> in <filename unknown>:0
at System.ConsoleDriver..cctor () <0x41d99e10 + 0x000a7> in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) <0x41d997c0 + 0x00043> in <filename unknown>:0
at System.Console..cctor () <0x41d994d0 + 0x00173> in <filename unknown>:0
--- End of inner exception stack trace ---
at StardewValley.Game1.set_gameMode (Byte value) <0x41d9ca40 + 0x00053> in <filename unknown>:0
at StardewValley.Program.handleException (System.Object sender, System.UnhandledExceptionEventArgs args) <0x41d9c000 + 0x0006b> in <filename unknown>:0


Anyone here knows what is missing or what I should do? Thank you very much for any help :)
No posts in this topic were marked as the solution yet. If you can help, add your reply
Hello,

I had exactly the same issue on openSUSE Tumbleweed.
To get the game running, type this command in the terminal:

export TERM=xterm && ~/GOG\ Games/Stardew\ Valley/start.sh

Cant even remember where i found this tweak, but this should work ! ;-)
Post edited November 28, 2021 by ced117
I had a similar issue with Stardew Valley segfaulting ( Linux, stardew_valley_1_5_5_1860937376_52037 ).

----

Running Stardew Valley
./StardewValley: line 7: sw_vers: command not found
./StardewValley: line 27: 91330 Segmentation fault (core dumped) ./"Stardew Valley" $@
Stack trace of thread 91330:
#0 0x00007f35435d673f n/a (GOG Games/Stardew Valley/game/libSDL2-2.0.so.0 + 0x13573f)
#0 0x00007f35435d673f in SDL_Fcitx_Init () from GOG Games/Stardew Valley/game/libSDL2-2.0.so.0

----

I have Japanese IME installed (fcitx+anthy) which somehow causes Stardew Valley 1.5.5 to segfault (1.5.4 was fine). Disabling IME (unsetting environment variables GTK_IM_MODULE, QT_IM_MODULE, XMODIFIERS) for Stardew Valley helped.

No other issues so far.
If you run the game using Lutris just go into System Options and change locale to English US UTF8 and the problem will be solved