InvalidOperationException at UpdateStackSizesFixed
I am getting this on the server all of the sudden.  It has been running fine with no errors on last update.

[Error] Failed to call hook 'OnServerInitialized' on plugin 'StackSize v2.1.1' (InvalidOperationException: Operation is not valid due to the current state of the object)
at System.Linq.Enumerable.First[ItemGeneratorAsset] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.First[ItemGeneratorAsset] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0

at Oxide.Plugins.StackSize.UpdateStackSizes () [0x00000] in <filename unknown>:0

at Oxide.Plugins.StackSize.OnServerInitialized () [0x00000] in <filename unknown>:0

at Oxide.Plugins.StackSize.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
Hello,

This error only happens when the server restarts, i will take a look at it when i have time.

Merged post

Hey @Overlord,

I can't manage to reproduce your error with the latest version.
Could you give me a little more info on this error?
Is it still happening, when does it happen, how often does it happen?

I am still not exactly sure what was going on with it.  I had 3 plugins that would error during the restart of the server.  Stack Sizes, Skip Night, and Time Control.   Everything was updated from oxide to the plugins and was not causing any problems until i noticed this in gamelog.

Server failed to start:  : Failed to bind to port range 13371-13371 ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted.

at System.Net.Sockets.Socket.Bind (System.Net.EndPoint local_end) [0x00000] in <filename unknown>:0
at uLink.NetworkSocket+UDPIPv4Only.Bind (NetworkEndPoint listenEndPoint) [0x00000] in <filename unknown>:0
at  . () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at  . () [0x00000] in <filename unknown>:0
at  . (Int32 , Int32 , Int32 ) [0x00000] in <filename unknown>:0

The host fixed this issue and all is back to normal with no errors.   This was causing an issue where the server was running but nobody could connect to it and it was showing offline. 
In response to Overlord ():
I am still not exactly sure what was going on with it.  I had 3 plugins that would error during the...
That error is from Hurtworld, which means that a server is already running on that port; not really related to the plugins as they do not manage that.
In response to Wulf ():
That error is from Hurtworld, which means that a server is already running on that port; not really...
There was a bug in the latest game update that would crash the server on some new anti ddos system and that would lock up the ports.
Doesn't have anything to do with this plugin or uMod...
@MrBlue 
Could you please fix this,  
I've reinstalled the plugin twice also the config file and nothing happens even when  I set the stacksize on 255 

13:20 [Error] Failed to call hook 'OnServerInitialized' on plugin 'StackSize v2.1.1' (InvalidOperationException: Operation is not valid due to the current state of the object)
  at System.Linq.Enumerable.First[ItemGeneratorAsset] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.First[ItemGeneratorAsset] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 
  at Oxide.Plugins.StackSize.UpdateStackSizes () [0x00000] in <filename unknown>:0 
  at Oxide.Plugins.StackSize.CheckConfig () [0x00000] in <filename unknown>:0 
  at Oxide.Plugins.StackSize.OnServerInitialized () [0x00000] in <filename unknown>:0 
  at Oxide.Plugins.StackSize.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0 
13:20 [Warning] Calling 'OnServerInitialized' on 'StackSize v2.1.1' took 140ms​

 

I'll take a look at it when i have some more time, try removing the config file and reload the plugin to fix it for now.
Locked automatically