Error in console after update.Solved

I've just updated this plugin to the latest version and now getting this in the console..

17/03 09:18:05 | Failed to call hook 'OnEntityDeath' on plugin 'DeathNotes v6.4.1' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.DeathNotes.OnEntityDeath (BaseCombatEntity victimEntity, HitInfo hitInfo) [0x00019] in <9692663ace22426283a960d49dcf261e>:0
at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003b4] in <9692663ace22426283a960d49dcf261e>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0
17/03 09:18:05 | NullReferenceException: Object reference not set to an instance of an object
Regards
MetalHead

same here and i am up to date with oxide

Thanks for bringing this to our attention. Does this exception appear immediately upon startup, or when a certain type of entity is killed?

These are the things logged just before it triggered the hook fail If there of any help. It happened about 60 to 90 mins after installation, there has been a server restart after it's installation but nothing in the logs so far.

17/03 11:11:28 | [Custom Chinook Drops] Hackable Crate dropped at Missile Silo (406.87,70.2,807.74)
17/03 11:13:22 | [Automated Events] Spawning Cargo Plane
17/03 11:13:38 | [APDiscordOnline] No players online to send.
17/03 11:14:57 | [Economics] Saving balances for players...
17/03 11:14:57 | [Skill Tree] Saving player data for 0 players.
17/03 11:14:57 | [Skill Tree] Finished saving player data.
17/03 11:14:58 | Saved 101,031 ents, cache(0.13), write(0.07), disk(0.02).
17/03 11:14:58 | Saving complete

Regards
MetalHead

Just to add.. There was no-one on the server at the time

I believe I have corrected this. Please upgrade to 6.4.2 and let me know if you see it again. Thanks!

Ignore this. I failed to see the update


Merged post

Failed to call hook 'OnEntityDeath' on plugin 'DeathNotes v6.4.2' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.DeathNotes.OnEntityDeath (BaseCombatEntity victimEntity, HitInfo hitInfo) [0x0001c] in <3547ea893e504032855349b283eaf844>:0

at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003b4] in <3547ea893e504032855349b283eaf844>:0

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

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

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

Calling kill - but already IsDestroyed!? fridge.deployed


even after update I found this spamming console. I have wipe day tomorrow I will see if a fresh install clears that up


Merged post

after update. still seeing this NRE

Merged post

needs .net null check

Thanks for the information. Can you confirm that you're upgraded to the most recent version of Oxide?

yes I can confirm

Unfortunately I'm still getting this in the console periodically. Nothing in general seems to trigger it, it just happens.

20/03 17:16:05 | Failed to call hook 'OnEntityDeath' on plugin 'DeathNotes v6.4.2' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.DeathNotes.OnEntityDeath (BaseCombatEntity victimEntity, HitInfo hitInfo) [0x0001c] in <4505ff6ca05d4da88b62295e8e533e74>:0
at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003b4] in <4505ff6ca05d4da88b62295e8e533e74>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0
20/03 17:16:05 | NullReferenceException: Object reference not set to an instance of an object

Regards
MetalHead

Also using the latest version.

Thank you both.

Merged post

Can one/both of you perform the following test for me? Copy your current JSON config file somewhere else. Then delete the plugin and config JSON files, then install the newest version of the plugin. It should generate a new JSON config file. You can add back in your death messages from the copy, bu please try to leave the new file alone as much as possible. I'm testing a theory that there may be a config mismatch between old and new, which could be leading to the exception. Thanks!

Deleted the plugin and config files as requested. Installed the latest version that created a new config file. Haven't done anything to the config file but still getting this in the console occasionally.

22/03 11:16:18 | Failed to call hook 'OnEntityDeath' on plugin 'DeathNotes v6.4.3' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.DeathNotes.OnEntityDeath (BaseCombatEntity victimEntity, HitInfo hitInfo) [0x00019] in <3233166836b84f5b892d5f30960d9c59>:0
at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003b4] in <3233166836b84f5b892d5f30960d9c59>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0
22/03 11:16:18 | NullReferenceException: Object reference not set to an instance of an object

Regards
MetalHead

Note.. It seems to happen a lot right after a server save.

OK, thanks for running that to ground.

If any of you are still experiencing this exception and would not mind helping me debug it (I don't see this exception on my test server), I would appreciate it. If so, please message me on Discord (@terceran.) and I'll send you a special version of the file that will log some information that will help me pinpoint the issue. Thanks!

I fixed my version with  .net null check

i am also having the same issues i think....

---

Failed to call hook 'OnEntityDeath' on plugin 'DeathNotes v6.4.3' (NullReferenceException: Object reference not set to an instance of an object.)
at Oxide.Plugins.DeathNotes.OnEntityDeath (BaseCombatEntity victimEntity, HitInfo hitInfo) [0x00019] in <c50fbc3ab8bf4f8ca8d20b09c3a6dcec>:0
at Oxide.Plugins.DeathNotes.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x003b4] in <c50fbc3ab8bf4f8ca8d20b09c3a6dcec>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <8cb2d664f1574f2b96d53f1c1869d96a>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <8cb2d664f1574f2b96d53f1c1869d96a>:0


i'd be willing to help you if you want. my console is being spammed with this error.

Locked