NullReferenceException at DetermineStack
So I'm getting the following when the server starts or i reload StackSizeController.   I'm running the latest Rust update, Oxide update, and plugin update.  Any ideas what may be causing it?
  Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v2.0.0'
(NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x0
0047] in <e00765c9102e427694059e8e6adae21c>:0
at Oxide.Plugins.StackSizeController.UpdateItems () [0x0003a] in <e00765c9102e
427694059e8e6adae21c>:0
at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0000c] in <e007
65c9102e427694059e8e6adae21c>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, Syste
m.Object& ret, System.Object[] args) [0x0037e] in <e00765c9102e427694059e8e6adae
21c>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod meth
od, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[]
args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] arg
So basically, the data file is not being generated whenever I run the server. The config file is there, but the data file is nowhere to be seen. I tried to create one manually, and copy and paste the vanilla data file, but it still doesn't work whever I try to run the "/stackall default" command. Here is what is being outputed to the console everytime i try to run the stackall command:
Failed to call hook 'StackAllCommand' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x0003c] in <21e3a9be355d4dbfba77f15c443b6695>:0
ents, 1 slprs 2kb/s in, 7kb/s out
at Oxide.Plugins.StackSizeController.StackAllCommand (BasePlayer player, System.String command, System.String[] args) [0x00089] in <21e3a9be355d4dbfba77f15c443b6695>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002f2] in <21e3a9be355d4dbfba77f15c443b6695>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
Failed to call hook 'StackAllCommand' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x0003c] in <21e3a9be355d4dbfba77f15c443b6695>:0
ents, 1 slprs 2kb/s in, 5kb/s out
at Oxide.Plugins.StackSizeController.StackAllCommand (BasePlayer player, System.String command, System.String[] args) [0x00089] in <21e3a9be355d4dbfba77f15c443b6695>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002f2] in <21e3a9be355d4dbfba77f15c443b6695>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0


Merged post

why did this get merged?
What does your config look like?
Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x00047] in <1c5b72d5e84c454b8c0d258cfc017ad5>:0 
  at Oxide.Plugins.StackSizeController.UpdateItems () [0x0003a] in <1c5b72d5e84c454b8c0d258cfc017ad5>:0 
  at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0000c] in <1c5b72d5e84c454b8c0d258cfc017ad5>:0 
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0037e] in <1c5b72d5e84c454b8c0d258cfc017ad5>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0


I was told to bring this here for support regarding this. Any help would be appreciated as SSC is really handy on my server 

Delete configuration files and data files, reinstall plug-ins, try it?
In response to Arainrr ():
Delete configuration files and data files, reinstall plug-ins, try it?
THANK YOU SOOOOOOO VERY MUCH, i didn't even think to wipe the plugin and try again 
(20:01:21) | Unloaded plugin Stack Size Controller v2.0.0 by Canopy Sheep (20:01:22) | Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x00047] in <213f30c07bcc42f381b4dd1f6e85035f>:0
at Oxide.Plugins.StackSizeController.UpdateItems () [0x0003a] in <213f30c07bcc42f381b4dd1f6e85035f>:0
at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0000c] in <213f30c07bcc42f381b4dd1f6e85035f>:0
at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0037e] in <213f30c07bcc42f381b4dd1f6e85035f>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0 (20:01:22) | Loaded plugin Stack Size Controller v2.0.0 by Canopy Sheep
 
 
 
failed to call hook
My server daily restarts twice a day,  on a restart it will give that error above ^^ -

if I o.reload StackSizeController to re-load the plugin it starts working again and works fine again (Until another daily restart)

I've tried removing the plugin then re-installing but same effect. 
Delete your config file then reload your plugin
yeah did all that same response - totally removed all traces of the plugin then reinstalled it, could be clashing with another mod not sure which.

i'm having to use Timed Execute to reload the plugin after 5 minutes of a server restart otherwise i get that same message as ontheedge 
Which version of the plugin do you have ? Try downgrading and delete the config again 

(13:33:05) | StackSizeController was compiled successfully in 1879ms

(13:33:05) | [Stack Size Controller] Generating a new config file...

(13:33:05) | Loaded plugin Stack Size Controller v2.0.0 by Canopy Sheep

i have a restart at 2pm gmt, will test it again



Merged post

yeah 2pm came, it never run the plugin - i had to force it to start 

I get the following mistakes:
---------------------------------------------------------------------------------------
Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x00030] in <7cf3e760c1b34c719bd2df28a2aeecd7>:0

at Oxide.Plugins.StackSizeController.UpdateItems () [0x0003a] in <7cf3e760c1b34c719bd2df28a2aeecd7>:0

at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0000c] in <7cf3e760c1b34c719bd2df28a2aeecd7>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0037e] in <7cf3e760c1b34c719bd2df28a2aeecd7>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0
---------------------------------------------------------------------------------------

Today I downloaded the latest Oxide version (v2.0.4228) and installed it.

Server was restarted.
Unfortunately, the mistake still comes.

I hope I'm in the right place. Otherwise the topic can be postponed.
If the bug is in the plugin, I can't tell. But if I did, I'm sure more people would contact here.

In response to Micha ():
I get the following mistakes:
----------------------------------------------------------------...
posting your config and data config in the plugin help section usually results in a quicker reply. mine is working as normal

StackSizeController was compiled successfully in 1641ms

(12:34:30) | Failed to call hook 'OnServerInitialized' on plugin 'StackSizeController v2.0.0' (NullReferenceException: Object reference not set to an instance of an object)

at Oxide.Plugins.StackSizeController.DetermineStack (ItemDefinition item) [0x00030] in <5f07b1b64a8f4357aa3d916bd3d42095>:0

at Oxide.Plugins.StackSizeController.UpdateItems () [0x0003a] in <5f07b1b64a8f4357aa3d916bd3d42095>:0

at Oxide.Plugins.StackSizeController.OnServerInitialized () [0x0000c] in <5f07b1b64a8f4357aa3d916bd3d42095>:0

at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0037e] in <5f07b1b64a8f4357aa3d916bd3d42095>:0

at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0

at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0

at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <4452f821def6406d834e4149849fe7ea>:0

| Loaded plugin Stack Size Controller v2.0.0 by Canopy Sheep


but it still dsnt work