'Unity Game Server: NullReferenceException: Object reference not set to an instance of an object
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
Solution 1:[1]
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.
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Adam Evans |
Solution 2 | M.Ford |