Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error upon running #115

Open
Spawn43 opened this issue Sep 21, 2022 · 2 comments
Open

Fatal error upon running #115

Spawn43 opened this issue Sep 21, 2022 · 2 comments

Comments

@Spawn43
Copy link

Spawn43 commented Sep 21, 2022

I'm trying to run this through portainer using an existing world. When i attempt to run the container i get as far as world saved before the crash.

Validating world save: 17%

Validating world save: 33%

Validating world save: 56%

Validating world save: 76%

Backing up world file

[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object

  at Terraria.Main.startDedInputCallBack () [0x00017] in <0fcd5f39a6264235b839ac215b842ba8>:0 

  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <533173d24dae460899d2b10975534bb0>:0 

  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <533173d24dae460899d2b10975534bb0>:0 

  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <533173d24dae460899d2b10975534bb0>:0 

  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <533173d24dae460899d2b10975534bb0>:0 

  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <533173d24dae460899d2b10975534bb0>:0 

To my understanding i've done everything correct I've bound the /root/.local/share/Terraria/Worlds to my worlds folder, and then put in the enviroment variable for the world name. Any idea on how to fix this would be greatly appreciated

@aadityadhruv
Copy link
Contributor

Currently facing the same issue. This error only happens if I run the command in detached mode. If run it with interactive + tty, it works just fine. Not sure what is the reason for this.

@aadityadhruv
Copy link
Contributor

Just figured a way around this. You can use both the -it flag and the -d flag (ie run it detached but with the tty), and the server runs fine! I am guesssing this has something to do with how the server reads input? Anyway this workaround I suggested works. Here is the command for your reference:

podman run -d -it --rm -v ./world:/root/.local/share/Terraria/Worlds:Z -p 7777:7777 ryshe/terraria -world /root/.local/share/Terraria/Worlds/<World-Name>.wld -config /root/.local/share/Terraria/Worlds/config.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants