anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
46 stars 16 forks source link

Basket Trap and AiTaskSeekFoodandEat issue #3922

Closed jacopouggeri closed 1 month ago

jacopouggeri commented 5 months ago

Game Version

1.19.8

Platform

Mac

Modded

Vanilla

SP/MP

Singleplayer

Description

Breaking a basket trap while an entity is eating from it will freeze all entities until the game is reloaded and spam an error in the logs.

A giveaway that the bug was reproduced is that when this happens, the food item in the trap will drop and glitch up and down on the ground.

How to reproduce

1: Set down basket trap 2: Place meat 3: Place wolf nearby 4: When wolf is eating, break the trap

Screenshots

No response

Logs

9.6.2024 15:25:25 [Server Error] Exception: Object reference not set to an instance of an object.
   at Vintagestory.GameContent.CreatureDiet.Matches(ItemStack itemstack) in VSEssentials\Systems\POIRegistry.cs:line 70
   at Vintagestory.GameContent.BlockEntityBasketTrap.IsSuitableFor(Entity entity, CreatureDiet diet) in VSSurvivalMod\BlockEntity\BEBasketTrap.cs:line 148
   at Vintagestory.GameContent.AiTaskSeekFoodAndEat.ContinueExecute(Single dt) in VSEssentials\Entity\AI\Task\TasksImpl\AiTaskSeekFoodAndEat.cs:line 238
   at Vintagestory.GameContent.AiTaskManager.OnGameTick(Single dt) in VSEssentials\Entity\AI\Task\AiTaskManager.cs:line 174
   at Vintagestory.GameContent.EntityBehaviorTaskAI.OnGameTick(Single deltaTime) in VSEssentials\Entity\AI\Task\BehaviorTaskAI.cs:line 114
   at Vintagestory.API.Common.Entities.Entity.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\Entity.cs:line 874
   at Vintagestory.API.Common.EntityAgent.OnGameTick(Single dt) in VintagestoryApi\Common\Entity\EntityAgent.cs:line 540
   at Vintagestory.Server.ServerSystemEntitySimulation.TickEntities(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 330
   at Vintagestory.Server.ServerSystemEntitySimulation.OnServerTick(Single dt) in VintagestoryLib\Server\Systems\World\EntitySimulation.cs:line 169
   at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 886
Craluminum2413 commented 1 month ago

Closing due to inactivity

jacopouggeri commented 1 month ago

Maybe I don't understand something, does the bug still happen? If so why close?

Craluminum2413 commented 1 month ago

@jacopouggeri Could you reproduce it in 1.20?