SEServerExtender / EssentialsPlugin

Dedicated Essentials Plugin
GNU Lesser General Public License v3.0
18 stars 18 forks source link

Player Block Enforcement crash #105

Closed zenduin closed 7 years ago

zenduin commented 8 years ago

SESE Version: 1.146.6.562 Essentials version 1.13.7.53 SE Version 1.140.007 (stable)

Steps to reproduce: Add a block to the PlayerBlockEnforcmentItems list (I defined a limit of 5 Refineries). Build one of those blocks Save game and restart server Grind the block you built

2016-07-30 14:20:18.964: Logging off Steam... 2016-07-30 14:20:18.964: Shutting down server... 2016-07-30 14:20:19.025: Done 2016-07-30 14:20:19.0413|Error|System.Reflection.TargetInvocationException: Exce ption has been thrown by the target of an invocation. ---> System.Collections.Ge neric.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at EssentialsPlugin.Utility.PlayerBlockEnforcement.<>c__DisplayClass13_0.<Fat Block_OwnershipChanged>b__1() at Sandbox.MySandboxGame.ProcessInvoke() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass1.<Run>b__0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashSc reen) at VRage.Dedicated.DedicatedServer.RunInternal() at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String custom Path, Boolean isService, Boolean showConsole) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec t[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke Attr, Binder binder, Object[] parameters, CultureInfo culture) at SEModAPIInternal.API.Server.DedicatedServerAssemblyWrapper.StartServer(Str ing instanceName, String overridePath, Boolean useConsole) |System.Reflection.TargetInvocationException: Exception has been thrown by t he target of an invocation. ---> System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary. at System.Collections.Generic.Dictionary2.get_Item(TKey key) at EssentialsPlugin.Utility.PlayerBlockEnforcement.<>cDisplayClass13_0.<Fat Block_OwnershipChanged>b1() at Sandbox.MySandboxGame.ProcessInvoke() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>cDisplayClass1.b0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashSc reen) at VRage.Dedicated.DedicatedServer.RunInternal() at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String custom Path, Boolean isService, Boolean showConsole) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Objec t[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke Attr, Binder binder, Object[] parameters, CultureInfo culture) at SEModAPIInternal.API.Server.DedicatedServerAssemblyWrapper.StartServer(Str ing instanceName, String overridePath, Boolean useConsole) The given key was not present in the dictionary. System.Collections.Generic.KeyN otFoundException TValue get_Item(TKey) at System.Collections.Generic.Dictiona ry`2.get_Item(TKey key) at EssentialsPlugin.Utility.PlayerBlockEnforcement.<>cDisplayClass13_0.<Fat Block_OwnershipChanged>b1() at Sandbox.MySandboxGame.ProcessInvoke() at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>cDisplayClass1.b0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashSc reen) at VRage.Dedicated.DedicatedServer.RunInternal() at VRage.Dedicated.DedicatedServer.RunMain(String instanceName, String custom Path, Boolean isService, Boolean showConsole) 2016-07-30 14:20:19.1348|Info|Server has stopped running

zenduin commented 7 years ago

Thx for the fix finally! :)