**REPORTED** Server Startting Issue - System.Exception: Magic number is wrong: 542

ZomgNinja

Terrarian
Steam or GOG
Steam
Single Player/Multiplayer
Both
Operating System
Linux Other
Terraria Version
1.4.0
Controls Used
Keyboard/Mouse
Steam or GOG: N/A
Terraria: Version 1.4.2
Single Player/Multiplayer: N/A
Controls Used: N/A
Operating System: Linux ubuntu 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Once I set. 'TERM=xterm' the server will work.
Found from here

This is a fresh boot of xubuntu on vmware. comands used.

1 sudo apt update 2 sudo apt install terminator 3 vim 4 sudo apt install vim 5 sudo apt update && sudo apt install -y wget tmux unzip 6 ls 7 ls -l 8 wget https://terraria.org/system/dedicated_servers/archives/000/000/036/original/terraria-server-1402.zip?1589675482 9 unzip terraria-server* 10 cd ../Terraria-Server/ 11 ls 12 cd 1402/ 13 ls 14 cd Linux/ 15 ls 16 sudo chmod +x TerrariaServer.bin.x86* 17 ./TerrariaServer.bin.x86_64 18 TERM=xterm 19 ./TerrariaServer.bin.x86_64 18 uname -a

Error below:

Code:
ubuntu-may-2020@ubuntu:~/Terraria-Server/1402/Linux$ ./TerrariaServer.bin.x86_64

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) [0x0002b] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00065] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.ConsoleDriver..cctor () [0x00062] in <1170fb08300b4d0db71c1d1db8555768>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x0000a] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.Console..cctor () [0x000a8] in <1170fb08300b4d0db71c1d1db8555768>:0
   --- End of inner exception stack trace ---
  at Terraria.Utilities.CrashWatcher.Inititialize () [0x00000] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.Program.SetupLogging () [0x0007d] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x0006c] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.LinuxLaunch.Main (System.String[] args) [0x00038] in <4ca1e6c0de0846809f149ffc19998e7b>:0
[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) [0x0002b] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.TermInfoReader..ctor (System.String term, System.String filename) [0x00065] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.TermInfoDriver..ctor (System.String term) [0x00058] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.ConsoleDriver.CreateTermInfoDriver (System.String term) [0x00000] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.ConsoleDriver..cctor () [0x00062] in <1170fb08300b4d0db71c1d1db8555768>:0
   --- End of inner exception stack trace ---
  at System.Console.SetupStreams (System.Text.Encoding inputEncoding, System.Text.Encoding outputEncoding) [0x0000a] in <1170fb08300b4d0db71c1d1db8555768>:0
  at System.Console..cctor () [0x000a8] in <1170fb08300b4d0db71c1d1db8555768>:0
   --- End of inner exception stack trace ---
  at Terraria.Utilities.CrashWatcher.Inititialize () [0x00000] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.Program.SetupLogging () [0x0007d] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.Program.LaunchGame (System.String[] args, System.Boolean monoArgs) [0x0006c] in <4ca1e6c0de0846809f149ffc19998e7b>:0
  at Terraria.LinuxLaunch.Main (System.String[] args) [0x00038] in <4ca1e6c0de0846809f149ffc19998e7b>:0
 
Been that way before 1.4 as well. Broken terminfo thingy. Set your `TERM` to something "simple" (like "screen" or "xterm").
$ TERM=screen ./TerrariaServer.bin.x86_64
 
Back
Top Bottom