MineColonies

MineColonies

53M Downloads

villagers complain about "AI" errors

boneskull opened this issue ยท 10 comments

commented

Prerequisites

  • I am running the latest alpha version of MineColonies for my Minecraft version.
  • I checked the MineColonies Wiki and made sure that my issue is not covered there.
  • I made sure that this issue is not a duplicate of any existing issue.
  • This is an issue and not a feature request. Please create all feature requests here.

Context

  • Minecraft Version: 1.15.2
  • MineColonies Version: 0.13.81 release
  • Related Mods and Their Versions:

Expected behavior

Request system working & villagers do not complain about "AI" errors

Actual behaviour

Builders (many times), deliveryman (once), and one of baker/lumberjack/miner (I can't recall, but one of those) complain about "AI" errors and want me to submit logs.

Requests seem to be getting lost over time. Upon load, things work for awhile, and then the request queue (as shown by the clipboard tool) becomes empty, yet builders and other villagers have outstanding requests. The deliveryman fulfills from the warehouse, but at some point seems to stop fulfilling orders, and I will need to go fulfill the requests manually.

Steps to reproduce the issue

I don't have a reproduction plan. This started happening several days ago, starting with maybe 0.13.74-BETA or newer. I have two builders, and am building various structures and upgrading others. I am using the Fortress set.

Logs

This logfile is from around when the issue was occurring.

commented

Something corrupted your request system. Did you try a /mc colony requestsystem-reset on your colony?

commented

Will try that next time it happens

commented

OK, I've tried that, and the problems start happening immediately afterward: https://gist.github.com/boneskull/27531859c927764f4160dab81fbd27e9

commented

I added a second file to that gist. I think sorting at the warehouse might be causing the problem.

I can't say this for sure, since it happens after I reset-all and before I sort anything.

commented

I will avoid sorting this and see if it goes away

commented

Can you try the newest version?

commented

sure, I'll update. fwiw, I haven't been sorting, and have not had the problem.

commented

OK, it's still happening. Not sorting the warehouse, but getting these NPEs. Here's this morning's logfile: https://gist.github.com/boneskull/60f67750dac0edce60e58f3c5b1ea2d7

commented

sorting the warehouse in v0.13.95-ALPHA results in:

[10:59:38] [Server thread/ERROR]: Trying to dump into same slot again!
java.lang.Exception: null
	at com.minecolonies.coremod.util.SortingUtils.pushIntoInv(SortingUtils.java:107) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.util.SortingUtils.lambda$sort$0(SortingUtils.java:67) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.util.SortingUtils$$Lambda$21623/703536967.accept(Unknown Source) [?:0.13.95-ALPHA]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) [?:1.8.0_51]
	at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) [?:1.8.0_51]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) [?:1.8.0_51]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) [?:1.8.0_51]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) [?:1.8.0_51]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) [?:1.8.0_51]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_51]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) [?:1.8.0_51]
	at com.minecolonies.coremod.util.SortingUtils.sort(SortingUtils.java:67) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.lambda$onExecute$0(SortWarehouseMessage.java:54) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage$$Lambda$21621/558329392.accept(Unknown Source) [?:0.13.95-ALPHA]
	at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161) [?:?]
	at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.onExecute(SortWarehouseMessage.java:54) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.messages.server.colony.building.warehouse.SortWarehouseMessage.onExecute(SortWarehouseMessage.java:16) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.messages.server.AbstractBuildingServerMessage.onExecute(AbstractBuildingServerMessage.java:79) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.messages.server.AbstractColonyServerMessage.onExecute(AbstractColonyServerMessage.java:144) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.NetworkChannel.lambda$null$3(NetworkChannel.java:234) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.NetworkChannel$$Lambda$20147/838253034.run(Unknown Source) [?:0.13.95-ALPHA]
	at net.minecraftforge.fml.network.NetworkEvent$Context.enqueueWork(NetworkEvent.java:215) [?:?]
	at com.minecolonies.coremod.network.NetworkChannel.lambda$registerMessage$4(NetworkChannel.java:234) [?:0.13.95-ALPHA]
	at com.minecolonies.coremod.network.NetworkChannel$$Lambda$14321/892229991.accept(Unknown Source) [?:0.13.95-ALPHA]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.lambda$tryDecode$3(IndexedMessageCodec.java:128) [?:?]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec$$Lambda$19348/1223385616.accept(Unknown Source) [?:?]
	at java.util.Optional.ifPresent(Optional.java:159) [?:1.8.0_51]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.tryDecode(IndexedMessageCodec.java:128) [?:?]
	at net.minecraftforge.fml.network.simple.IndexedMessageCodec.consume(IndexedMessageCodec.java:162) [?:?]
	at net.minecraftforge.fml.network.simple.SimpleChannel.networkEventListener(SimpleChannel.java:80) [?:?]
	at net.minecraftforge.fml.network.simple.SimpleChannel$$Lambda$2140/1840423520.accept(Unknown Source) [?:?]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:212) [eventbus-2.2.0-service.jar:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:204) [eventbus-2.2.0-service.jar:?]
	at net.minecraftforge.eventbus.EventBus$$Lambda$2142/1010419513.invoke(Unknown Source) [eventbus-2.2.0-service.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:258) [eventbus-2.2.0-service.jar:?]
	at net.minecraftforge.fml.network.NetworkInstance.dispatch(NetworkInstance.java:84) [?:?]
	at net.minecraftforge.fml.network.NetworkHooks.lambda$onCustomPayload$1(NetworkHooks.java:78) [?:?]
	at net.minecraftforge.fml.network.NetworkHooks$$Lambda$19335/1255291780.apply(Unknown Source) [?:?]
	at java.util.Optional.map(Optional.java:215) [?:1.8.0_51]
	at net.minecraftforge.fml.network.NetworkHooks.onCustomPayload(NetworkHooks.java:78) [?:?]
	at net.minecraft.network.play.ServerPlayNetHandler.func_147349_a(ServerPlayNetHandler.java:1279) [?:?]
	at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:42) [?:?]
	at net.minecraft.network.play.client.CCustomPayloadPacket.func_148833_a(CCustomPayloadPacket.java:12) [?:?]
	at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:33) [?:?]
	at net.minecraft.network.PacketThreadUtil$$Lambda$19668/1038343539.run(Unknown Source) [?:?]
	at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) [?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(ThreadTaskExecutor.java:173) [?:?]
	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) [?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:731) [?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:141) [?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(ThreadTaskExecutor.java:135) [?:?]
	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:714) [?:?]
	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:708) [?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(ThreadTaskExecutor.java:115) [?:?]
	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:693) [?:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:641) [?:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51]

so the deliveryman is complaining about AI errors. haven't seen it out of a different citizen tho

commented

seems to have been fixed since v0.13.144-ALPHA. sorting the warehouse seems safe to do as well. thanks!