Vampirism - Become a vampire!

Vampirism - Become a vampire!

16M Downloads

ConcurrentModificationException while ticking entity

LemADEC opened this issue ยท 9 comments

commented

Versions

  • Minecraft: 1.10.2
  • Forge: 12.18.3.2511
  • Vampirism: 1.10.2-1.2.4

Issue Description

Server crash while a player is in the overworld opening a chest, and another player is watching mobs killing each others in the nether.

Reproduce Steps

Unknown at this time

Additional Information

...
Time: 2/21/18 5:17 PM
Description: Ticking entity

java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
        at net.minecraft.entity.EntityLivingBase.func_70679_bo(EntityLivingBase.java:586)
        at net.minecraft.entity.EntityLivingBase.func_70030_z(EntityLivingBase.java:343)
        at net.minecraft.entity.EntityLiving.func_70030_z(EntityLiving.java:208)
        at net.minecraft.entity.Entity.func_70071_h_(Entity.java:359)
        at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1932)
        at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295)
        at de.teamlapen.vampirism.entity.EntityVampirism.func_70071_h_(EntityVampirism.java:176)
        at org.spongepowered.common.event.tracking.TrackingUtil.tickEntity(TrackingUtil.java:158)
        at net.minecraft.world.WorldServer.redirect$onCallEntityUpdate$zkc000(WorldServer.java:2850)
        at net.minecraft.world.World.func_72866_a(World.java:4075)
        at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:839)
        at net.minecraft.world.World.func_72870_g(World.java:1937)
        at net.minecraft.world.World.func_72939_s(World.java:6016)
        at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:2197)
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709)
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387)
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471)
        at java.lang.Thread.run(Thread.java:748)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Server thread
Stacktrace:
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
        at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
        at net.minecraft.entity.EntityLivingBase.func_70679_bo(EntityLivingBase.java:586)
        at net.minecraft.entity.EntityLivingBase.func_70030_z(EntityLivingBase.java:343)
        at net.minecraft.entity.EntityLiving.func_70030_z(EntityLiving.java:208)
        at net.minecraft.entity.Entity.func_70071_h_(Entity.java:359)
        at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1932)
        at net.minecraft.entity.EntityLiving.func_70071_h_(EntityLiving.java:295)
        at de.teamlapen.vampirism.entity.EntityVampirism.func_70071_h_(EntityVampirism.java:176)
        at org.spongepowered.common.event.tracking.TrackingUtil.tickEntity(TrackingUtil.java:158)
        at net.minecraft.world.WorldServer.redirect$onCallEntityUpdate$zkc000(WorldServer.java:2850)
        at net.minecraft.world.World.func_72866_a(World.java:4075)
        at net.minecraft.world.WorldServer.func_72866_a(WorldServer.java:839)
        at net.minecraft.world.World.func_72870_g(World.java:1937)

-- Entity being ticked --
Details:
        Entity Type: vampirism.ghost (de.teamlapen.vampirism.entity.EntityGhost)
        Entity ID: 58783
        Entity Name: Ghost
        Entity's Exact location: -76.91, 92.00, -28.47
        Entity's Block location: World: (-77,92,-29), Chunk: (at 3,5,3 in -5,-2; contains blocks -80,0,-32 to -65,255,-17), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
        Entity's Momentum: 0.00, -0.08, 0.00
        Entity's Passengers: []
        Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
        at net.minecraft.world.World.func_72939_s(World.java:6016)
        at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:2197)

-- Affected level --
Details:
        Level name: DIM-1
        All players: 1 total; [EntityPlayerMP['LemADEC'/362, l='DIM-1', x=-69.17, y=93.86, z=-20.89]]
        Chunk stats: ServerChunkCache: 169 Drop: 0
        Level seed: 5974428348320978871
        Level generator: ID 10 - lostcities, ver 0. Features enabled: true
        Level generator options: {"profile":"imperium"}
        Level spawn location: World: (0,64,0), Chunk: (at 0,4,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
        Level time: 3127364 game time, 3127364 day time
        Level dimension: 0
        Level storage version: 0x04ABD - Anvil
        Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
        Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
...
commented

I've reproduced it in single player just by spawning a few ghosts and some Thaumcraft Eldritch mobs.

I suppose we can throw potions at entities with splash or arrows too.

We're also using the infernal mobs mod, they will change potions when mob is spawning and might update them periodically.

commented

Looks like Thaumcraft Eldritch warden has some form of aura that will trigger the issue.

commented

Does this happen frequently?

This crash is rather random and not necessary related to Vampirism. I am not entirely sure how this happens. Either some mod (could be Vampirism or a different one) is modifying the potions during an entity update or a modded potion is behaving strangely.

commented

I have implement a small "fix" that should prevent this crash, if it should actually be caused by Vampirism.
However, if this crash occurs frequently it is likely caused by another mod, and we would have to investigate further

commented

From the logs, it appears auras are handled in a separate thread, so it's probably a Thaumcraft issue.

commented

Thaumcraft is, unfortunately, not open source so we will have to reply on a reply from their side.
Still not really sure how this crash is possible.

commented

Issue confirmed on Thaumcraft, to be confirmed with Beta8

commented

Closing as fixed in Thaumcraft (supposedly)