NullReferenceException at DestroyUiFixed

Hey,

just started my server with the new update (1.2.7) with removing lang files and got this message in the console:

not sure whats up with it, is something wrong on my side or is it the plugin? thanks for any answer on this!

best regards,

Crystallize

what version did you update from?

from the one before, should be 1.2.6? i guess i started using the plugin with that version

and now updated to 1.2.8 and still have the message in my console (after server restart)

Crystallize

from the one before, should be 1.2.6? i guess i started using the plugin with that version

and now updated to 1.2.8 and still have the message in my console (after server restart)

Is it a one time error when server starts or is it happening over and over. Was there anyone on the server when this error appeared 

i believe its a one time error when the server starts and no, no one was on the server at that time.

14:09 [Info] Loaded plugin XPerience v1.2.8 by MACHIN3
14:11 [Error] Failed to call hook 'OnPlayerHealthChange' on plugin 'XPerience v1.2.8' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Game.Rust.Cui.CuiHelper.DestroyUi (BasePlayer player, System.String elem) [0x00035] in <288c15f72eb2462c85dd40b43bf86fe3>:0 
  at Oxide.Plugins.XPerience.DestroyUi (BasePlayer player, System.String name) [0x00000] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.LiveStats (BasePlayer player, System.Boolean update) [0x00039] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.OnPlayerHealthChange (BasePlayer player, System.Single oldValue, System.Single newValue) [0x0001d] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x017b1] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0 ​

doesn't even show up after plugin reload, only on serverrestart. Not sure whats the problem there. Also we got another one like that called "Failed to call hook 'OnResearchCostDetermine' on Plugin XPerience v1.2.8'" not sure whats that about.

Maybe these are just some weird rust errors, i'm not so familiar with Rust modding and just wanted to report it, in case its something serious. If not, i'm sorry :D

ok if no one is on the server and it's trying to call this then it sounds like an NPC got added to your data file by mistake and is trying to run it. If you know how to look for an NPC in the datafile check and see and delete the entry for it. If you don't you can contact me directly with a copy of it and I can look through it and see if I can find it.

Crystallize

i believe its a one time error when the server starts and no, no one was on the server at that time.

14:09 [Info] Loaded plugin XPerience v1.2.8 by MACHIN3
14:11 [Error] Failed to call hook 'OnPlayerHealthChange' on plugin 'XPerience v1.2.8' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Game.Rust.Cui.CuiHelper.DestroyUi (BasePlayer player, System.String elem) [0x00035] in <288c15f72eb2462c85dd40b43bf86fe3>:0 
  at Oxide.Plugins.XPerience.DestroyUi (BasePlayer player, System.String name) [0x00000] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.LiveStats (BasePlayer player, System.Boolean update) [0x00039] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.OnPlayerHealthChange (BasePlayer player, System.Single oldValue, System.Single newValue) [0x0001d] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.XPerience.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x017b1] in <f680cd5e51b543ac9ff932ca61781019>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <12678b905a6d43c3a9cc366104306651>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <12678b905a6d43c3a9cc366104306651>:0 ​

wich data file exactly? the ones from the plugin, like "XPerience.json" ? since there i can't find any NPC entry, only our players on the server are in there.

Crystallize

wich data file exactly? the ones from the plugin, like "XPerience.json" ? since there i can't find any NPC entry, only our players on the server are in there.

Yeah it would be the XPerience.json file. It's very odd that this would even be called when you server starts when no players are online which is why i think there would be an NPC somehow listed in the data file as they are spawned on server starts. The thing to look for is a non SteamID for the entry. there are 3 references it's listing there, OnPlayerHealthChange, DestroyUi, then LiveStats which is the live experience bar so somehow there is an ID being called that doesn't properly match.

in the data file i only found valid steam IDs, don't see any other non SteamIDs in there sadly

Merged post

did the last oxide update + plugin update and didn't see the error anymore, so seems fixed for me! Thanks for helping with this :D

Another Error after server restart :)
Failed to call hook 'OnPlayerHealthChange' on plugin 'XPerience v1.3.7' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Game.Rust.Cui.CuiHelper.DestroyUi (BasePlayer player, System.String elem) [0x00035] in <a2caa66d751f4245adb2ca4277ef3723>:0
at Oxide.Plugins.XPerience.DestroyUi (BasePlayer player, System.String name) [0x00000] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.LiveStats (BasePlayer player, System.Boolean update, System.String consumable) [0x0000d] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.OnPlayerHealthChange (BasePlayer player, System.Single oldValue, System.Single newValue) [0x0001d] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01cca] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0
ITSB
Another Error after server restart :)
Failed to call hook 'OnPlayerHealthChange' on plugin 'XPerience v1.3.7' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Game.Rust.Cui.CuiHelper.DestroyUi (BasePlayer player, System.String elem) [0x00035] in <a2caa66d751f4245adb2ca4277ef3723>:0
at Oxide.Plugins.XPerience.DestroyUi (BasePlayer player, System.String name) [0x00000] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.LiveStats (BasePlayer player, System.Boolean update, System.String consumable) [0x0000d] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.OnPlayerHealthChange (BasePlayer player, System.Single oldValue, System.Single newValue) [0x0001d] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.XPerience.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x01cca] in <c60c8a7a54d049808fcb1a536a2f7f02>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <dfcb48ea05694263bbc08e62a39c274c>:0

update to the newest version, if the problem is still there create a new thread for it. thanks

Locked automatically