Bishbash777 / SEDB-RELOADED

MIT License
8 stars 13 forks source link

[FATAL] Initializer: System.NullReferenceException #41

Closed trushoff closed 2 years ago

trushoff commented 3 years ago

Crash on torch start.

[FATAL]  Initializer: System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.DiscordBridge.RegisterDiscord() in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\DiscordBridge.cs:line 99
   at SEDiscordBridge.DiscordBridge..ctor(SEDiscordBridgePlugin plugin) in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\DiscordBridge.cs:line 49
   at SEDiscordBridge.SEDiscordBridgePlugin.LoadSEDB() in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\SEDiscordBridgePlugin.cs:line 275
   at SEDiscordBridge.SEDiscordBridgePlugin.Init(ITorchBase torch) in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\SEDiscordBridgePlugin.cs:line 71
   at Torch.Managers.PluginManager.LoadPlugins() in C:\build\workspace\Torch_Torch_master\Torch\Plugins\PluginManager.cs:line 202
   at Torch.TorchBase.Init() in C:\build\workspace\Torch_Torch_master\Torch\TorchBase.cs:line 317
   at Torch.Server.TorchServer.Init() in C:\build\workspace\Torch_Torch_master\Torch.Server\TorchServer.cs:line 143
   at Torch.Server.Initializer.<Run>b__23_0() in C:\build\workspace\Torch_Torch_master\Torch.Server\Initializer.cs:line 149
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.DiscordBridge.RegisterDiscord() in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\DiscordBridge.cs:line 99
   at SEDiscordBridge.DiscordBridge..ctor(SEDiscordBridgePlugin plugin) in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\DiscordBridge.cs:line 49
   at SEDiscordBridge.SEDiscordBridgePlugin.LoadSEDB() in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\SEDiscordBridgePlugin.cs:line 275
   at SEDiscordBridge.SEDiscordBridgePlugin.Init(ITorchBase torch) in F:\plugins\GIT\SEDB-RELOADED\SEDiscordBridge\SEDiscordBridgePlugin.cs:line 71
   at Torch.Managers.PluginManager.LoadPlugins() in C:\build\workspace\Torch_Torch_master\Torch\Plugins\PluginManager.cs:line 202
   at Torch.TorchBase.Init() in C:\build\workspace\Torch_Torch_master\Torch\TorchBase.cs:line 317
   at Torch.Server.TorchServer.Init() in C:\build\workspace\Torch_Torch_master\Torch.Server\TorchServer.cs:line 143
   at Torch.Server.Initializer.<Run>b__23_0() in C:\build\workspace\Torch_Torch_master\Torch.Server\Initializer.cs:line 149
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
tadavispmd040507 commented 3 years ago

+1

bodyboarder2528 commented 3 years ago

Can you add your SEDB config here just redact the token

tadavispmd040507 commented 3 years ago

I dont know about his but mine crashes the Torch on start, I don't even get the chance to start the server but here is my config

<?xml version="1.0" encoding="utf-8"?>
<SEDBConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Enabled>true</Enabled>
  <PreLoad>true</PreLoad>
  <Embed>false</Embed>
  <DisplaySteamId>false</DisplaySteamId>
  <BotToken></BotToken>
  <ChatChannelId>844682491209187338</ChatChannelId>
  <Format>:rocket: **{p}**: {msg}</Format>
  <Format2>[D]{p}</Format2>
  <CommandChannelId>844682542073774111</CommandChannelId>
  <CommandPrefix>;;</CommandPrefix>
  <AsServer>false</AsServer>
  <UseNicks>false</UseNicks>
  <BotToGame>false</BotToGame>
  <ServerToDiscord>false</ServerToDiscord>
  <ServerName>MG_Admin</ServerName>
  <StatusChannelId>844682491209187338</StatusChannelId>
  <Started>:white_check_mark: Server Started!</Started>
  <Stopped>:x: Server Stopped!</Stopped>
  <StripGPS>false</StripGPS>
  <Connect>:key: The player {p} connected to server</Connect>
  <Join>:sunny: The player {p} joined the server</Join>
  <Leave>:new_moon: The player {p} left the server</Leave>
  <SimPing>false</SimPing>
  <SimChannel />
  <SimThresh>0.60</SimThresh>
  <SimMessage>@here Simulation speed has dropped below threshold!</SimMessage>
  <SimCooldown>1200</SimCooldown>
  <UseStatus>true</UseStatus>
  <StatusInterval>5000</StatusInterval>
  <StatusPre>Server Starting...</StatusPre>
  <Status>{p} players | SS {ss}</Status>
  <MentOthers>true</MentOthers>
  <MentEveryone>false</MentEveryone>
  <TokenVisibleState>Visible</TokenVisibleState>
  <RemoveResponse>30</RemoveResponse>
  <FactionChannels />
  <GlobalColor>White</GlobalColor>
  <FacColor>Green</FacColor>
  <FacFormat>:ledger: **{p}**: {msg}</FacFormat>
  <FacFormat2>[D-Fac]{p}</FacFormat2>
  <CommandPerms />
</SEDBConfig>
bodyboarder2528 commented 3 years ago

Try removing the _ between MG and Admin

tadavispmd040507 commented 3 years ago

does the same with "MG-Admin" or "MGAdmin"

bodyboarder2528 commented 3 years ago

just comparing mine to yours and the only other real dif is

[Discord] {p} mine [D]{p} yours
bodyboarder2528 commented 3 years ago

for format2 up top

tadavispmd040507 commented 3 years ago

well that was a newly generated config and i havent changed that yet as now i cant even get Torch to boot even with no plugin or mods getting this from the with nothing on it so i think theres more at play here.

21:53:16.5825 [FATAL]  Initializer: System.Exception: Fatal error during dedicated server init see log for more information.
   at Patched_Sandbox.MySandboxGame.ctor_0(Object windowHandle, String[] , IntPtr )
   at SpaceEngineers.Game.SpaceEngineersGame..ctor(String[] commandlineArgs)
   at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 291
   at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
System.Exception: Fatal error during dedicated server init see log for more information.
   at Patched_Sandbox.MySandboxGame.ctor_0(Object windowHandle, String[] , IntPtr )
   at SpaceEngineers.Game.SpaceEngineersGame..ctor(String[] commandlineArgs)
   at Torch.VRageGame.DoStart() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 291
   at Torch.VRageGame.Run() in C:\build\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 123
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
bodyboarder2528 commented 3 years ago

ok torch.cfg file

tadavispmd040507 commented 3 years ago

this is the most recent with no plugins installed

<?xml version="1.0" encoding="utf-8"?>
<TorchConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <InstanceName>Instance</InstanceName>
  <InstancePath>C:\Users\MG_Admin\Documents\SE_Torch\Instance</InstancePath>
  <Autostart>false</Autostart>
  <RestartOnCrash>false</RestartOnCrash>
  <NoGui>false</NoGui>
  <GetTorchUpdates>true</GetTorchUpdates>
  <GetPluginUpdates>true</GetPluginUpdates>
  <TickTimeout>60</TickTimeout>
  <Plugins />
  <LocalPlugins>false</LocalPlugins>
  <DisconnectOnRestart>false</DisconnectOnRestart>
  <ChatName>Server</ChatName>
  <ChatColor>Red</ChatColor>
  <EnableWhitelist>false</EnableWhitelist>
  <Whitelist />
  <WindowWidth>980</WindowWidth>
  <WindowHeight>588</WindowHeight>
  <FontSize>16</FontSize>
  <UgcServiceType>Steam</UgcServiceType>
  <LastUsedTheme>Torch Theme</LastUsedTheme>
  <IndependentConsole>false</IndependentConsole>
  <EnableAsserts>false</EnableAsserts>
</TorchConfig>
bodyboarder2528 commented 3 years ago

have you tried a fresh torch install again?

tadavispmd040507 commented 3 years ago

yeah thats what that file was from

tadavispmd040507 commented 3 years ago

I have a ticket into Torch as well...

tadavispmd040507 commented 3 years ago

Torch issue is fixed but not this one.

ChromeAndroid commented 3 years ago

Just wanted to add on here - fresh install of latest torch with the latest version of this plugin, nothing else installed, torch crashes with this on startup every time.

mathewdamon commented 3 years ago

I seem to be getting this issue as well. I am using GTXGaming as my host.

PickleBurg commented 2 years ago

Has anyone found a solution?