Server Exception: FSMComponent.BudgetedUpdate
Someone please help. I don't know what causing this error. This is going on hundreds of times a minute.
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception, Object)
ServerMgr:Update()
Server Exception: FSMComponent.BudgetedUpdate
NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Component.GetComponentFastPath(UnityEngine.Component,System.Type,intptr)
  at UnityEngine.Component.GetComponent[T] () [0x00021] in <935634f5cc14479dbaa30641d55600a9>:0 
  at Rust.Ai.Gen2.SenseComponent.InSameTeam (BaseEntity other) [0x0000e] in <da23943dfd92447496853dae246acf92>:0 
  at Rust.Ai.Gen2.SenseComponent.Tick () [0x000b0] in <da23943dfd92447496853dae246acf92>:0 
  at Rust.Ai.Gen2.FSMComponent+TickFSMWorkQueue.RunJob (Rust.Ai.Gen2.FSMComponent component) [0x00019] in <da23943dfd92447496853dae246acf92>:0 
  at PersistentObjectWorkQueue`1[T].RunList (System.Double maximumMilliseconds) [0x000a8] in <7582b04fd6684b8485efc1ca57cfffb5>:0 
  at ServerMgr.Update () [0x004d8] in <da23943dfd92447496853dae246acf92>:0 

What plugins you got?

Rust.Ai.Gen2 is the new animals..

After removing all mods, shutting down.. updateing again.. restarting.. waiting and slowly adding mods back in. The problem has stopped. The mods I did not add back in are...

 

Night Zombies, Convoy Reforged, Sputnik, Better NPC and BotReSpawn. Pretty much anything that requires a bot spawner is in question. Without those mods... havent had the problem since.

Rust.Ai.Gen2  is an animal so one of them mods must ber spawning an animal in i would assume.

Same here. Pretty sure its animal AI broken. New months update(2025.05) fault.

Remove FSMComponent can stop error spam. But maybe also make some animals stop moving.

Copy these code to txt file and save it as .cs then put it in plugins folder. It will remove all FSMComponent from entity. The problem is not fixed but can make your console clear. When new error spam, reload it.

namespace Oxide.Plugins
{
    [Info("MCBugFix2", "diaolingtyp", "0.1.5")]
    [Description("MCBugFix2")]
    internal class MCBugFix2 : RustPlugin
    {
        private void OnServerInitialized()
        {
            foreach (var entity in UnityEngine.Object.FindObjectsOfType<BaseEntity>())
            {
                if (entity == null || entity.IsDestroyed) continue;

                var fsmComponent = entity.GetComponent<Rust.Ai.Gen2.FSMComponent>();
                if (fsmComponent != null)
                {
                    UnityEngine.Object.Destroy(fsmComponent);
                    Puts("removed");
                }
            }
        }
    }

}​
diaolingtyp

Same here. Pretty sure its animal AI broken. New months update(2025.05) fault.

Remove FSMComponent can stop error spam. But maybe also make some animals stop moving.

Copy these code to txt file and save it as .cs then put it in plugins folder. It will remove all FSMComponent from entity. The problem is not fixed but can make your console clear. When new error spam, reload it.

namespace Oxide.Plugins
{
    [Info("MCBugFix2", "diaolingtyp", "0.1.5")]
    [Description("MCBugFix2")]
    internal class MCBugFix2 : RustPlugin
    {
        private void OnServerInitialized()
        {
            foreach (var entity in UnityEngine.Object.FindObjectsOfType<BaseEntity>())
            {
                if (entity == null || entity.IsDestroyed) continue;

                var fsmComponent = entity.GetComponent<Rust.Ai.Gen2.FSMComponent>();
                if (fsmComponent != null)
                {
                    UnityEngine.Object.Destroy(fsmComponent);
                    Puts("removed");
                }
            }
        }
    }

}​


NONONONO BAD dont use this bad code can cause server stalls and crashes. :( 

Instead of

UnityEngine.Object.FindObjectsOfType<BaseEntity>()

Use 

BaseNetworkable.serverEntities

Also do not destroy that component or you could also make some animals ghosts and not killable. Would be best to just kill the animall off.

j4G0D6Ab1IMMgBU.png Razor

NONONONO BAD dont use this bad code can cause server stalls and crashes. :( 

Instead of

UnityEngine.Object.FindObjectsOfType<BaseEntity>()

Use 

BaseNetworkable.serverEntities

Also do not destroy that component or you could also make some animals ghosts and not killable. Would be best to just kill the animall off.

yes you are right. I read this before and carbon also show me dont use FindObjectsOfType. sorry for bad example.

B3SHxlDxq2jgkzc.png Razor

NONONONO BAD dont use this bad code can cause server stalls and crashes. :( 

Instead of

UnityEngine.Object.FindObjectsOfType<BaseEntity>()

Use 

BaseNetworkable.serverEntities

Also do not destroy that component or you could also make some animals ghosts and not killable. Would be best to just kill the animall off.

How would I change it to just kill the animal off? I have had this same spam issue since update

So I think I'll just keep Animal AI turned off, it completely destroys my server and save files ever since this jungle update, even if I just quickly unload the NoAnimalsAI plugin. Seems to be conflicting with Panthers or something and it does really weird stuff to the server, for example. I unloaded the NoAnimalsAI to see if it was fixed(wishful thinking), next thing I know players are hollering about all their TCs got deleted, and it completely corrupts the .sav file.

Thanks a lot. It is way better than nothing :D