Bishbash777 / SEDB-RELOADED

MIT License
8 stars 13 forks source link

Startup Crash when world factions do not match SEDB faction chat list config #27

Closed Blaylock1988 closed 3 years ago

Blaylock1988 commented 3 years ago

Crash during server startup when world factions do not match SEDB faction chat list, and discord faction chat channels.

This can happen when a faction is created, and the plugin config is saved (from admin changing options), but the server crashes before the world is saved so the new factions are missing from the world.


   at SEDiscordBridge.DiscordBridge.<RaiseFactionDeleted>d__42.MoveNext() in D:\prog\csharp\se\SE_mods\SEDB\SEDiscordBridge\DiscordBridge.cs:line 407
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
System.NullReferenceException: Object reference not set to an instance of an object.
   at SEDiscordBridge.DiscordBridge.<RaiseFactionDeleted>d__42.MoveNext() in D:\prog\csharp\se\SE_mods\SEDB\SEDiscordBridge\DiscordBridge.cs:line 407
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()```
Blaylock1988 commented 3 years ago

I deleted the missing factions from the SEDB config and the server booted up fine after. Need to add some sort of check or catch if the faction is missing in the world file.

Blaylock1988 commented 3 years ago

I apologize, these issues should have been for LTP's fork. We had mixed up plugin zip files on the server.