Jump to content

latest update broken.

Pending 2.8.0

Stampy
Stampy

Posted

Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NpcSpawn.CreateCustomNpc (UnityEngine.Vector3 position, Oxide.Plugins.NpcSpawn+NpcConfig config) [0x0001c] in <ae92e3084b414917b4488da0c62f5459>:0 
  at Oxide.Plugins.NpcSpawn.SpawnNpc (UnityEngine.Vector3 position, Newtonsoft.Json.Linq.JObject configJson) [0x00008] in <ae92e3084b414917b4488da0c62f5459>:0 
  at Oxide.Plugins.NpcSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000b0] in <ae92e3084b414917b4488da0c62f5459>: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 
Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.0' (NullReferenceException: Object reference not set to an instance of an object)

Jbird

Posted

13 hours ago, Stampy said:

Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.0' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.NpcSpawn.CreateCustomNpc (UnityEngine.Vector3 position, Oxide.Plugins.NpcSpawn+NpcConfig config) [0x0001c] in <ae92e3084b414917b4488da0c62f5459>:0 
  at Oxide.Plugins.NpcSpawn.SpawnNpc (UnityEngine.Vector3 position, Newtonsoft.Json.Linq.JObject configJson) [0x00008] in <ae92e3084b414917b4488da0c62f5459>:0 
  at Oxide.Plugins.NpcSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000b0] in <ae92e3084b414917b4488da0c62f5459>: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 
Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.0' (NullReferenceException: Object reference not set to an instance of an object)

NRE are actually most often a configuration issue.

Look into exactly when this error starts to appear, and use that to sort out which plugin that is using NpcSpawn is throwing the error, and we can sort out step by step the source and what needs done to resolve this.

More information is helpful like what plugin using this starts or is running, how often it comes up, things of that nature.

Stampy

Posted

the only thing i was using this with before is Dynamic monuments but i have not got around to re-adding that to the server yet.

Jbird

Posted

On 4/4/2025 at 4:18 PM, Stampy said:

the only thing i was using this with before is Dynamic monuments but i have not got around to re-adding that to the server yet.

Is NpcSpawn working properly, including its use by other plugins that use NpcSpawn?

JustANoob

Posted

Failed to call internal hook 'Unload' on plugin 'NpcSpawn v2.8.0' [4006810030] (Collection was modified; enumeration operation may not execute.)
   at bool System.Collections.Generic.Dictionary<ulong, Oxide.Plugins.NpcSpawn+CustomScientistNpc>+ValueCollection+Enumerator.MoveNext()
   at void Oxide.Plugins.NpcSpawn.Unload() in /home/container/carbon/plugins/NpcSpawn.cs:line 2204
   at object Oxide.Plugins.NpcSpawn.InternalCallHook(uint hook, object[] args) in NpcSpawn.cs/Internal:line 369
Unloaded plugin NpcSpawn v2.8.0 by KpucTaJl

 

Jbird

Posted

2 hours ago, JustANoob said:
Failed to call internal hook 'Unload' on plugin 'NpcSpawn v2.8.0' [4006810030] (Collection was modified; enumeration operation may not execute.)
   at bool System.Collections.Generic.Dictionary<ulong, Oxide.Plugins.NpcSpawn+CustomScientistNpc>+ValueCollection+Enumerator.MoveNext()
   at void Oxide.Plugins.NpcSpawn.Unload() in /home/container/carbon/plugins/NpcSpawn.cs:line 2204
   at object Oxide.Plugins.NpcSpawn.InternalCallHook(uint hook, object[] args) in NpcSpawn.cs/Internal:line 369
Unloaded plugin NpcSpawn v2.8.0 by KpucTaJl

You can make your own ticket any time so others are not getting notifications for a separate issue.

Please try this. If it works great, if you still have issues or questions make a new ticket and I will get back to you there.

foreach (CustomScientistNpc npc in Scientists.Values) if (npc.IsExists()) npc.Kill();

Change to this

foreach (CustomScientistNpc npc in Scientists.Values.ToHashSet()) if (npc.IsExists()) npc.Kill();

In the plugin file.

1.7m

Downloads

Total number of downloads.

7.9k

Customers

Total customers served.

119.5k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.