sekelsta / detailedanimals

Animal husbandry, behaviour, and genetics for Vintage Story
Other
1 stars 0 forks source link

[AiTaskForage] Exception: Object reference not set to an instance of an object. #1

Closed BradyThe closed 1 month ago

BradyThe commented 1 month ago

While having a quick gander at the mod in Creative, I tried testing the creep gate (which doesn't have a crafting recipe - intended?). Spawning a lamb didn't work because it almost instantly grew up. So I tried taking the long route. Something in the feeding process seem to trigger this error message. I wasn't able to figure out exactly what is causing this (filled trough, empty trough, grass items on floor, hay items on floor), but when it happens, it creates several tens of thousands of error messages per minute, effectively killing the server.

[Error] Exception: Object reference not set to an instance of an object.
   at Genelib.AiTaskForage.<FinishExecute>b__18_0(Single dt) in /home/tiffany/main/projects/vs_mods/detailedanimals/src/Genelib/Entity/Task/AiTaskForage.cs:line 131
   at Vintagestory.Common.EventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Common\EventManager.cs:line 57
   at Vintagestory.Server.CoreServerEventManager.TriggerGameTick(Int64 ellapsedMilliseconds, IWorldAccessor world) in VintagestoryLib\Server\ServerEventManager.cs:line 123
   at Vintagestory.Server.ServerMain.Process() in VintagestoryLib\Server\ServerMain.cs:line 886

A handbook entry explaining the mechanics and processes a bit would be a nice addition. These are quite a bit different from the Vanilla experience. It also would be impolite to come empty handed, so I brought a localization file. Cheers!

BradyThe commented 1 month ago

Looks like I forgot a localization file -> genelib. I could use more context for "message-wrongnutrient-water". Is this purely related to a drinking need of an animal? If so, the translation doesn't need an update.

sekelsta commented 1 month ago

Thank you! I popped it into Google Translate and I think the message about thirst is good. Maybe I should change the English version to match.

sekelsta commented 1 month ago

I was unable to reproduce the exception, but found and fixed an issue that could in theory have been related. Please let me know if this is still happening on the latest version 0.1.1. All other bugs described here should be fixed now.

BradyThe commented 1 month ago

I was never really able to reproduce the error, they just happened. They don't pop up any more, though, so it appears to be fixed.

(I did potentially accidentally use this mod once or twice in combination with the 1.20 client, which would explain the fact that I was able to trigger the error, but not replicated it consistently... šŸ«£)