NullReferenceException at CanStackItemFixed

This is one of the errors showing in the console of a Linux server. It is currently being generated by two different plugins. It only started after the last updates. This does not happen on a windows server that had all the same plugins and config and data copied onto it.

 Failed to call hook 'CanStackItem' on plugin 'StackModifier v1.0.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.StackModifier.CanStackItem (Item item, Item targetItem) [0x002bc] in <595c972e2ead4d30b7322c73cae8023c>:0 
  at Oxide.Plugins.StackModifier.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00074] in <595c972e2ead4d30b7322c73cae8023c>: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

I purposly did not post this in this section because I already spoke to the dev and it is not caused by the plugin. I guess whoever keeps deleting and censoring the posts knows better

Your post was not deleted by any admin. It was moved here as it is the only plugin having this issue and clearly states it as being this plugin.

Looking at the plugin, I see at least a couple obvious things that would throw this error in this plugin's code.

I made another post on the wekend and it was removed. In it I showed two plugins with this error. Niether give the error on a windows test server.
The other plugin is PlaytimeSupplySignal. I did not post the error message because I removed it from the server because it stopped working.
I spoke to the dev of this plugin and he said it was not the cause of the error. That is also why I did not post it here.

I re-installed it and here is the error from PlaytimeSupplySignal:

'PlaytimeSupplySignal v1.1.3' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.PlaytimeSupplySignal.CountDaTime (System.Collections.Generic.List`1[T] playerlist) [0x00048] in <3e032bcb106746e195bfc6f1cca27aaf>:0 
  at Oxide.Plugins.PlaytimeSupplySignal.LetsClockOnActivePlaytime () [0x0000b] in <3e032bcb106746e195bfc6f1cca27aaf>:0 
  at Oxide.Plugins.PlaytimeSupplySignal.<OnServerInitialized>m__0 () [0x00000] in <3e032bcb106746e195bfc6f1cca27aaf>:0 
  at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in <c2afd8354b8b4f3ca451cf5a1aa111c3>:0​

The thread may have been removed in error, I apologize for that. There were some moderation tool issues during the last update which made it hard to manage threads and duplicate posts.

In regards to both errors, both are plugin-specific errors that have to be resolved in each plugin. If you are having an issue with another plugin, please use a separate thread in that plugin support section, not combined, so that the author/maintainer of each can be made aware and duplicate threads are avoided.

I have not yet tried with the Oxide version that was posted today

Merged post

I though that it was perhaps an Oxide error on Linux due to the plugins working on the exact same setup on a windows server

There were no changes with this hook in any update in the past few years. If it was an Oxide issue, it would have been reported more and you'd see a different error. This plugin needs to properly check for objects it uses from Rust that may be null, which a few of them it isn't checking for, hence the error.

To resolve the issue, the author should add some null checks and potentially some debug output in order to pinpoint and resolve which object it is using that is causing it.

Thank you for your help. I will post  the Playtime in the correct spot

The latest update should resolve this 1.0.4 

Locked automatically