1

I'm running a Valheim Game Server on Linus. And on startup it chrashes at following error and the terminal freezes.

 03/20/2022 00:58:19: Builder started
 
(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 39)

NullReferenceException: Object reference not set to an instance of an object
  at HeightmapBuilder.Build (HeightmapBuilder+HMBuildData data) [0x0005e] in <91ef1facb79f4708aa34c3c8c1befc47>:0 
  at HeightmapBuilder.BuildThread () [0x00067] in <91ef1facb79f4708aa34c3c8c1befc47>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00014] in <b6074dacdf2142f38da4050b03a225bb>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <b6074dacdf2142f38da4050b03a225bb>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <b6074dacdf2142f38da4050b03a225bb>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <b6074dacdf2142f38da4050b03a225bb>:0 
  at System.Threading.ThreadHelper.ThreadStart () [0x00008] in <b6074dacdf2142f38da4050b03a225bb>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)
 
(Filename: <91ef1facb79f4708aa34c3c8c1befc47> Line: 0)

I searched this error, but nothing helped me, so I'm forced to create this question.

I'm using a Rootserver with Debian 4.02. If there is anything more I need to share, please tell me.

Greetings

yFlix
  • 13
  • 1
  • 3
  • 1
    Does this answer your question? [What is a NullReferenceException, and how do I fix it?](https://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix-it) – BugFinder Mar 20 '22 at 10:00
  • @BugFinder I don't have access to the code so not that much unfortunately. – yFlix Mar 20 '22 at 14:33
  • 1
    Then if there’s no code how do you expect a bunch of coders to help? – BugFinder Mar 20 '22 at 18:48

3 Answers3

0

The new update broke my start up BAT on windows and gave this exact error. I simply copied the supplied default "start_headless_server.bat file and added my server name, world name, port and password and it is now working flawlessly. Your Linux server files should have a SH that is a default template. I would advise trying the same.

0

I had this problem too. Did you rename the world file? I was working fine then I renamed the world file and the startup gave me that error. restoring the file with the correct name fixed the issue for me. It was a total guess.

When you use the game to create and start the world, it doesn't matter. I was setting up a dedicated server to use with friends and he had used the same password as the world name so I figured I would just change the world name so we could keep the password. So, in the start up script, I changed the password but kept the world name the same. Hope this helps.

M.Ford
  • 369
  • 1
  • 4
  • 15
0

This same problem were occurring to me, both in my local server and cloud server; I did some digging and managed to fix mine.

The problem originated from start_server.sh or start_headless_server.bat specifically, on -password and -world parameter.

Apparently, if a world has been made and a password was already set on it, changing the password will result in said error for me. Changing the password to default or the one that you set when running the world for the first time fixes it for me.

I have little to no experience on game development, so I'm sorry if I couldn't give a much clearer answer.

Neek0tine
  • 11
  • 4