MineColonies

MineColonies

53M Downloads

NPE from delivery man

MatthiasMann opened this issue ยท 2 comments

commented

Minecolonies version

Version: minecolonies-1.12.2-0.9.133-ALPHA-universal

Expected behavior

No NPE

Actual behaviour

[00:55:53] [Server thread/WARN] [minecolonies]: Action for target com.minecolonies.coremod.entity.ai.util.AITarget@26eadcdf threw an exception:
java.lang.NullPointerException: null
at net.minecraftforge.items.wrapper.InvWrapper.getSlots(InvWrapper.java:61) ~[InvWrapper.class:?]
at com.minecolonies.api.util.InventoryUtils.addItemStackToItemHandlerWithResult(InventoryUtils.java:911) ~[InventoryUtils.class:?]
at com.minecolonies.api.util.InventoryUtils.forceItemStackToItemHandler(InventoryUtils.java:364) ~[InventoryUtils.class:?]
at com.minecolonies.coremod.entity.ai.citizen.deliveryman.EntityAIWorkDeliveryman.deliver(EntityAIWorkDeliveryman.java:508) ~[EntityAIWorkDeliveryman.class:?]
at com.minecolonies.coremod.entity.ai.util.AITarget.apply(AITarget.java:125) ~[AITarget.class:?]
at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.applyTarget(AbstractAISkeleton.java:208) ~[AbstractAISkeleton.class:?]
at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.checkOnTarget(AbstractAISkeleton.java:182) ~[AbstractAISkeleton.class:?]
at java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) [?:1.8.0_181]
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359) [?:1.8.0_181]
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) [?:1.8.0_181]
at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) [?:1.8.0_181]
at java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) [?:1.8.0_181]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:1.8.0_181]
at java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:449) [?:1.8.0_181]
at com.minecolonies.coremod.entity.ai.basic.AbstractAISkeleton.func_75246_d(AbstractAISkeleton.java:135) [AbstractAISkeleton.class:?]
at net.minecraft.entity.ai.EntityAITasks.func_75774_a(SourceFile:129) [xf.class:?]
at net.minecraft.entity.EntityLiving.func_70626_be(EntityLiving.java:763) [vq.class:?]
at net.minecraft.entity.EntityLivingBase.func_70636_d(EntityLivingBase.java:2352) [vp.class:?]
at net.minecraft.entity.EntityLiving.func_70636_d(EntityLiving.java:577) [vq.class:?]
at net.minecraft.entity.EntityAgeable.func_70636_d(EntityAgeable.java:178) [vd.class:?]
at com.minecolonies.coremod.entity.EntityCitizen.func_70636_d(EntityCitizen.java:555) [EntityCitizen.class:?]
at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2172) [vp.class:?]
at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295) [vq.class:?]
at net.minecraft.world.World.func_72866_a(World.java:1990) [amu.class:?]
at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:832) [oo.class:?]
at net.minecraft.world.World.func_72870_g(World.java:1952) [amu.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1756) [amu.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:613) [oo.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:767) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) [chd.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
[00:55:53] [Server thread/ERROR] [minecolonies]: Pausing Entity Oscar G. Baynton (com.minecolonies.coremod.job.Deliveryman) at BlockPos{x=83, y=65, z=330} for 100 Seconds because of error:
(now the stack trace repeats)

Steps to reproduce the problem

No idea. But it seems to have resolved itself after some time. I only noticed this when looking at the debug.log after closing the game.

Based on the coordinates and timing it could be the location of the removed guard tower (from #2892).

commented

Yeah, we are going to rework this as soon as our GUI rework done.
for now /mc rs reset colony: yourid should solve this

commented

@Raycoms How is this an Error of the RS? A simple reset here will not fix the issue.