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,

I just bought the game and want to run it on Arch Linux. I get the following error code if I execute the `start.sh`.

>$ ./start.sh
Running Hacknet
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Console ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.ConsoleDriver ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00000] in <filename unknown>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00000] in <filename unknown>:0
at System.TermInfoDriver..ctor (System.String term) [0x00000] in <filename unknown>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <filename unknown>:0
at System.ConsoleDriver..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Console..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Hacknet.Game1..ctor () [0x00000] in <filename unknown>:0
at Hacknet.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0


Any thoughts? To this point I can only find some entries in Steam forums arguing about having a Settings.txt and reducing the display resolution (which produces the same error).


Regards
hringriin
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
hringriin: Hi,

I just bought the game and want to run it on Arch Linux. I get the following error code if I execute the `start.sh`.

>$ ./start.sh
Running Hacknet
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Console ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.ConsoleDriver ---> System.Exception: Magic number is wrong: 542
at System.TermInfoReader.ReadHeader (System.Byte[] buffer, System.Int32& position) [0x00000] in <filename unknown>:0
at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00000] in <filename unknown>:0
at System.TermInfoDriver..ctor (System.String term) [0x00000] in <filename unknown>:0
at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <filename unknown>:0
at System.ConsoleDriver..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Console..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Hacknet.Game1..ctor () [0x00000] in <filename unknown>:0
at Hacknet.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

Any thoughts? To this point I can only find some entries in Steam forums arguing about having a Settings.txt and reducing the display resolution (which produces the same error).

Regards
hringriin
This is not an issue with the game, but rather with Mono. I found the following bug on the mono GitHub: https://github.com/mono/mono/issues/6752#issuecomment-365212655, and the workaround is to set TERM=xterm when starting the game from console. This solves the issue, and the game starts as it should.

$ TERM=xterm "~/GOG Games/Hacknet/start.sh"
Thank you very much!
I just ran into this on Fedora 32 on x86_64, running in Sawfish window manager with Konsole as the terminal. hjahre's TERM=xterm workaround did the trick. I added it near the top of start.sh so it doesn't need to be typed each time:

[code]
#!/bin/bash
#... SNIP...
# Hacknet

#;; Fix from the GoG forums:
TERM=xterm
export TERM

# Initialization
CURRENT_DIR="$( cd "$( dirname "... SNIP...
[/code]

Then ./start.sh works. Thanks hjahre. Haven't run into any other bugs getting past the first few challenges.