Help with Console Spam...anyone?

I am seeing the following since the October update, anyone else or better yet, anyone know what is causing this?

(15:10:02) | NullReferenceException: Object reference not set to an instance of an object.

(15:10:02) | Server Exception: CritterAnimalFSM.BudgetedUpdate

 

Thanks

check server log file, without full error, no one can help you

Server Exception: CritterAnimalFSM.BudgetedUpdate
NullReferenceException: Object reference not set to an instance of an object
at Rust.Ai.Gen2.FSMTransitionBase.get_Agent () [0x0000a] in <49b6f5bd2352455893fb5c5942f9a19c>:0
at Rust.Ai.Gen2.Trans_IsNavmeshReady.EvaluateInternal (Rust.Ai.Gen2.FSMPayload& payload) [0x000df] in <49b6f5bd2352455893fb5c5942f9a19c>:0
at Rust.Ai.Gen2.FSMTransitionBase.Evaluate (Rust.Ai.Gen2.FSMPayload& payload) [0x00008] in <49b6f5bd2352455893fb5c5942f9a19c>:0
at Rust.Ai.Gen2.FSMComponent.Tick () [0x000f1] in <49b6f5bd2352455893fb5c5942f9a19c>:0
at Rust.Ai.Gen2.FSMComponent+TickFSMWorkQueue.RunJob (Rust.Ai.Gen2.FSMComponent component) [0x0002e] in <49b6f5bd2352455893fb5c5942f9a19c>:0
at PersistentObjectWorkQueue`1[T].RunList (System.Double maximumMilliseconds) [0x0012b] in <20e04d7937e3499f83b3c025d4436fef>:0
at ServerMgr.Update () [0x0085b] in <49b6f5bd2352455893fb5c5942f9a19c>:0
UnityEngine.DebugLogHandler:Internal_LogException_Injected(Exception, IntPtr)
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception, Object)
ServerMgr:Update()

Merged post

i got upset and vibe coded a plugin to kill the bugged entity:<br />

 

C# // Reference: 0Harmony using System; using System.Reflection; using HarmonyLib; using Oxide.Core.Plugins; using UnityEngine; namespace Oxide.Plugins { [Info("Critter FSM Fix", "Custom", "1.0.0")] [Description("Catches FSMTransitionBase NREs at the source and removes bugged critters")] public class CritterFSMFix : RustPlugin { private const string HarmonyId = "com.custom.critterfsmfix"; private Harmony _harmony; private void Init() { _harmony = new Harmony(HarmonyId); MethodInfo targetMethod = AccessTools.Method(typeof(Rust.Ai.Gen2.FSMComponent), "Tick"); MethodInfo finalizerMethod = AccessTools.Method(typeof(CritterFSMFix), nameof(TickFinalizer)); if (targetMethod != null && finalizerMethod != null) { _harmony.Patch(targetMethod, finalizer: new HarmonyMethod(finalizerMethod)); Puts("Patched Rust.Ai.Gen2.FSMComponent.Tick successfully."); } else { PrintWarning("Could not locate Rust.Ai.Gen2.FSMComponent.Tick to patch."); } } private void Unload() { _harmony?.UnpatchAll(HarmonyId); } private static Exception TickFinalizer(Rust.Ai.Gen2.FSMComponent __instance, Exception __exception) { if (__exception is NullReferenceException) { if (__instance != null) { var entity = __instance.GetComponentInParent(); if (entity != null && !entity.IsDestroyed) { entity.Kill(); } else { __instance.enabled = false; } } // Returning null suppresses the exception so ServerMgr.Update never logs it return null; } return __exception; } } }



Merged post

Harmony Source Patch & Critter Cleanup (Best for Server FPS)

Simply hiding the console text still leaves the bugged critter throwing and unwinding a C# exception on every single server tick, which costs CPU time and aborts the rest of the CritterAnimalFSM queue for that frame.

If you use Harmony (0Harmony), you can attach a Harmony Finalizer directly to Rust.Ai.Gen2.FSMComponent.Tick(). When a critter hits the null Owner state, this catches the NullReferenceException before ServerMgr.Update() sees it and immediately kills the broken critter entity so it only faults once instead of every tick. 

 

Introducing the Critter Log Blocker you can name it CritterLogBlocker.cs to compile yeah. boom results.

Oxide Server, Cows stop doing their thing and become bugged when this happens, and way to fix this?

Server Exception: FSMComponent.BudgetedUpdate
NullReferenceException: Object reference not set to an instance of an object.
at UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) [0x00018] in <50b97fea633246a58f1593ad66ad4056>:0
at UnityEngine.Component.get_gameObject () [0x00006] in <50b97fea633246a58f1593ad66ad4056>:0
at UnityEngine.Component.TryGetComponent[T] (T& component) [0x00001] in <50b97fea633246a58f1593ad66ad4056>:0
at Rust.Ai.Gen2.SenseComponent.InSameTeam (BaseEntity other) [0x0000e] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
at Rust.Ai.Gen2.SenseComponent.Tick () [0x00105] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
at Rust.Ai.Gen2.FSMComponent+TickFSMWorkQueue.RunJob (Rust.Ai.Gen2.FSMComponent component) [0x00019] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
at PersistentObjectWorkQueue`1[T].RunList (System.Double maximumMilliseconds) [0x0012b] in <baeb21667bee429697e59224cc058c45>:0
at Rust.Ai.Gen2.FSMComponent.RunReturningUnusedMs (Rust.Ai.Gen2.FSMComponent+TickFSMWorkQueue queue, System.Double budgetMs) [0x00000] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
at Rust.Ai.Gen2.FSMComponent.RunBudgetedQueues () [0x0002e] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
at ServerMgr.Update () [0x0081f] in <73ab9ccfe54e4558b970f46616f3e8bf>:0
UnityEngine.DebugLogHandler:Internal_LogException_Injected(Exception, IntPtr)
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception, Object)
ServerMgr:Update()
 


Merged post

This is happening to my server ever day now, I don't imagine I am the only one.