New update error

Updated the new version and now getting this from time to time...

Failed to call hook 'CanStackItem' on plugin 'StackSizeController v3.3.0' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.StackSizeController.CanStackItem (Item item, Item targetItem) [0x0029e] in <3ee999e524314fbfa778b6564b66e328>:0 at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7b] in <3ee999e524314fbfa778b6564b66e328>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0

Not solved, still getting this even after re-downloading and then removing the plugin and installing it again

What's causing it?

Thanks for the update AnExiledDev

i can give same error. If i have a gun with attachments like holosight, and right click to the weapon to stack to a box or my backpack, the gun stacking fine, but the attachments for example holosights are disappear. Than write this error message to rcon: 

Failed to call hook 'CanStackItem' on plugin 'StackSizeController v3.3.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackSizeController.CanStackItem (Item item, Item targetItem) [0x0021f] in <1f79e859b9fb44f68c01ce84900ce527>:0 
  at Oxide.Plugins.StackSizeController.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00e7b] in <1f79e859b9fb44f68c01ce84900ce527>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0
On another method when i stacking guns on my inventory, the attachments are restored fine. The problem only have when use a box or a backpack. Please check this problem. I didn't found any problems with this plugin, but it's irritating.

I don't know what's causing it. I loaded the plugin and started getting the errors. I don't play on my server so couldn't tell ya. Given that's it's Mothers Day, I will be busy the rest of the day but I'll test stuff late tonight or tomorrow. 

....
.
.
............. 
Thanks

Gotcha, will try to resolve with a patch when I get a chance.

Merged post

Ahh yep, it was a dumb mistake on my part. I've already got a partial fix that preserves attachments, rather than losing them, but it doesn't properly remove them from the weapon and return them. I'll get that finished and fix a few other bugs and push an update later today. Thanks!