Special AI

Special AI

6M Downloads

[1.12.2] Server console spam: Tried to add over 100 AI tasks, pausing ai and aborting

Gr3atsaga opened this issue ยท 2 comments

commented

Occasionally a mob will spawn and the following will spam the console while the entity is loaded.
I am using the 1.12.2 version 1.1.0. This will occur over and over until either the entity is removed (killed, via command) or unloaded. I would assume it has potential to affect performance as it is obviously continuously trying to execute code.

I am playing the "InsaneCraft Modpack" on CurseForge, a newer pack, with some additional mods, but nothing that should be editing basic minecraft mob AIs.
I suppose it can be better tested by setting the chances to 100% for mobs to spawn with the special AIs,
I don't think it happens with all mobs that get the special AI, but it's random. May only be an issue with skeletons when both rolls hit (default config has two chances for elite ai on skeletons).

It does seem to happen consistently with support creepers from the Primitive Mobs mod, though. I see this spam with the support creeper often, and run a command to kill them. Perhaps the support creeper already has tons of tasks, and the extra tasks added (door breaking, griefing etc.) from this mod sends them over 100 every time.

I did manage to find the problem skeleton from the trace below, and it would continuously drop the bow from its hands. I think it finally quit when I hit it, not sure if that immediately fixed the task issue or if killing the entity was the fix.

[00:11:52] [Server thread/WARN]: Tried to add over 100 AI tasks, pausing ai and aborting
java.lang.Exception: null
at com.performant.coremod.entity.ai.CustomGoalSelector.addTask(CustomGoalSelector.java:144) [CustomGoalSelector.class:?]
at net.minecraft.entity.monster.AbstractSkeleton.setCombatTask(AbstractSkeleton.java:209) [acp.class:?]
at net.minecraft.entity.monster.AbstractSkeleton.setItemStackToSlot(AbstractSkeleton.java:247) [acp.class:?]
at lucraft.mods.lucraftcore.util.helper.LCEntityHelper.entityDropItem(LCEntityHelper.java:63) [LCEntityHelper.class:?]
at lucraft.mods.heroesexpansion.enchantments.HEEnchantments.onTick(HEEnchantments.java:43) [HEEnchantments.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1397_HEEnchantments_onTick_LivingUpdateEvent.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
at net.minecraftforge.common.ForgeHooks.onLivingUpdate(ForgeHooks.java:581) [ForgeHooks.class:14.23.5.2855]
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:2095) [vp.class:?]
at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:295) [vq.class:?]
at net.minecraft.entity.monster.EntityMob.onUpdate(EntityMob.java:50) [ade.class:?]
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:1996) [amu.class:?]
at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:832) [oo.class:?]
at net.minecraft.world.World.updateEntity(World.java:1958) [amu.class:?]
at net.minecraft.world.World.redirect$zbm000$updateEntity(World.java:4623) [amu.class:?]
at net.minecraft.world.World.updateEntities(World.java:1762) [amu.class:?]
at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:613) [oo.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:767) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:185) [chd.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51

2021-10-11-1.log]

commented

I think the issue is with the HeroesExpansion mod, not this mod. Sorry about that.

commented

All good!