SpongePowered / Sponge

The SpongeAPI implementation targeting vanilla Minecraft and 3rd party platforms.
MIT License
389 stars 211 forks source link

A named cause already exists with the name: Attacker #497

Closed stephan-gh closed 8 years ago

stephan-gh commented 8 years ago

The latest changes in SpongeCommon (very likely https://github.com/SpongePowered/SpongeCommon/commit/d190daa99276c39b97179841809e8d82ea74f1ea) cause SpongeVanilla (and maybe also SpongeForge) servers to crash sometimes complaining about a duplicate named cause:

---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!

Time: 10/02/16 10:52
Description: Ticking entity

java.lang.IllegalArgumentException: A named cause already exists with the name: Attacker
    at org.spongepowered.api.event.cause.Cause.fromList(Cause.java:266)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:585)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:562)
    at net.minecraft.world.World.handleDroppedItems(SourceFile:1135)
    at net.minecraft.world.World.handlePostTickCaptures(SourceFile:835)
    at net.minecraft.world.World.onCallEntityUpdate(SourceFile:543)
    at net.minecraft.world.World.func_72866_a(SourceFile:1408)
    at net.minecraft.world.WorldServer.func_72866_a(SourceFile:597)
    at net.minecraft.world.World.func_72870_g(SourceFile:1386)
    at net.minecraft.world.World.func_72939_s(SourceFile:1279)
    at net.minecraft.world.WorldServer.func_72939_s(SourceFile:478)
    at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:181)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299)
    at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535)
    at net.minecraft.server.MinecraftServer.run(SourceFile:451)
    at java.lang.Thread.run(Thread.java:745)

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

-- Head --
Stacktrace:
    at org.spongepowered.api.event.cause.Cause.fromList(Cause.java:266)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:585)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:562)
    at net.minecraft.world.World.handleDroppedItems(SourceFile:1135)
    at net.minecraft.world.World.handlePostTickCaptures(SourceFile:835)
    at net.minecraft.world.World.onCallEntityUpdate(SourceFile:543)
    at net.minecraft.world.World.func_72866_a(SourceFile:1408)
    at net.minecraft.world.WorldServer.func_72866_a(SourceFile:597)
    at net.minecraft.world.World.func_72870_g(SourceFile:1386)

-- Entity being ticked --
Details:
    Entity Type: Chicken (net.minecraft.entity.passive.EntityChicken)
    Entity ID: 103
    Entity Name: Chicken
    Entity's Exact location: 2.50, 66.29, -37.50
    Entity's Block location: 2.00,66.00,-38.00 - World: (2,66,-38), Chunk: (at 2,4,10 in 0,-3; contains blocks 0,0,-48 to 15,255,-33), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Entity's Momentum: 0.00, -0.02, 0.00
    Entity's Rider: ~~ERROR~~ NullPointerException: null
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.world.World.func_72939_s(SourceFile:1279)
    at net.minecraft.world.WorldServer.func_72939_s(SourceFile:478)

-- Affected level --
Details:
    Level name: Arcturus
    All players: 1 total; [EntityPlayerMP['Tzky'/963, l='Arcturus', x=24.52, y=67.80, z=-4.02]]
    Chunk stats: ServerChunkCache: 441 Drop: 0
    Level seed: 4226294234422182729
    Level generator: ID 09 - overworld, ver 0. Features enabled: false
    Level generator options: 
    Level spawn location: 0.00,66.00,0.00 - World: (0,66,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: 477446854 game time, 6341 day time
    Level dimension: 3
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
    at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:181)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299)
    at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535)
    at net.minecraft.server.MinecraftServer.run(SourceFile:451)
    at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
    Minecraft Version: 1.8.9
    Operating System: Linux (amd64) version 3.10.0-229.4.2.el7.x86_64
    Java Version: 1.8.0_65, Oracle Corporation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 497365568 bytes (474 MB) / 2926239744 bytes (2790 MB) up to 8555069440 bytes (8158 MB)
    JVM Flags: 5 total; -Xms1g -Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts
    IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95
    Plugins: 
        Plugin{id=minecraft, name=Minecraft, version=1.8.9}
        Plugin{id=statusprotocol, name=StatusProtocol, version=0.1-SNAPSHOT, source=mods/0statusprotocol-0.1.jar}
        Plugin{id=sponge, name=SpongeVanilla, version=1.8.9-3.1.0-BETA-240}
        Plugin{id=foxcore, name=FoxCore, version=0.7.0, source=mods/FoxCore-v0.7.0-74-SNAPSHOT-server.jar}
        Plugin{id=foxguard, name=FoxGuard, version=0.17.0, source=mods/FoxGuard-v0.17.0-210-SNAPSHOT.jar}
        Plugin{id=voxelsnipersponge, name=VoxelSniper-Sponge, version=7.1.0, source=mods/VoxelSniper-7.1.0-SNAPSHOT-all.jar}
        Plugin{id=blwarps, name=BLWarps, version=1.2.6, source=mods/BLWarps-1.2.6.jar}
        Plugin{id=CommandLogger, name=CommandLogger, version=1.0, source=mods/CommandLogger-1.0.0.jar}
        Plugin{id=musicbox, name=MusicBox, version=0.1, source=mods/musicbox-0.1.jar}
        Plugin{id=EssentialCmds, name=EssentialCmds, version=7.4-5a3968e, source=mods/EssentialCmds-7.4.jar}
        Plugin{id=GeoWorld, name=The Minecraft Geology Project, version=1.0.1a, source=mods/GeoWorld.jar}
        Plugin{id=nostalgiagen, name=NostalgiaGen, version=0.3, source=mods/nostalgiagen-0.3.1.jar}
        Plugin{id=JobsLite, name=JobsLite, version=1.2.0, source=mods/JobsLite-v1.2.0.jar}
        Plugin{id=PJW, name=Project Worlds, version=0.7.50, source=mods/projectworlds-3.1.0-v0.7.50.jar}
        Plugin{id=voidcraft, name=VoidCraft, version=0.1.0, source=mods/0VoidCraft.jar}
        Plugin{id=spongeapi, name=SpongeAPI, version=3.1.0-SNAPSHOT-648d95f}
        Plugin{id=worldedit, name=WorldEdit, version=6.1.1, source=mods/worldedit-spongevanilla-mc1.8.9-6.1.1-dist.jar}
        Plugin{id=TranslateWithBing, name=TranslateWithBing, version=1.1.1, source=mods/TranslateWithBing-1.1.1-all.jar}
        Plugin{id=PermissionsEx, name=PermissionsEx, version=2.0-SNAPSHOT, source=mods/PermissionsEx-Sponge.jar}
        Plugin{id=NoteBlockAPI, name=NoteBlockAPI, version=2.0, source=mods/noteblockapi-2.0.jar}
        Plugin{id=Updatifier, name=Updatifier, version=1.2.0, source=mods/00Updatifier-v1.2.0-r3.1.0.jar}
        Plugin{id=CraftBook, name=CraftBook, version=4.0, source=mods/CraftBook-4.0-SNAPSHOT-dist.jar}
        Plugin{id=EconomyLite, name=EconomyLite, version=1.1.4, source=mods/EconomyLite-v1.1.4.jar}
        Plugin{id=serverlistplus, name=ServerListPlus, version=3.4.1, source=mods/ServerListPlus-3.4.1-Universal.jar}
        Plugin{id=Tim, name=Tim the Enchanter, version=4.0.0, source=mods/TimTheEnchanter.jar}
        Plugin{id=AdminShop, name=AdminShop, version=1.3, source=mods/AdminShop-1.3e.jar}
    Profiler Position: N/A (disabled)
    Player Count: 1 / 32; [EntityPlayerMP['Tzky'/963, l='Arcturus', x=24.52, y=67.80, z=-4.02]]
    Is Modded: Definitely; Server brand changed to 'SpongeVanilla'
    Type: Dedicated Server (map_server.txt)
stephan-gh commented 8 years ago

Seems to happen when an entity drops items, e.g. if I kill a chicken it will crash immediately.

stephan-gh commented 8 years ago

Seems to only happen on SV.

clienthax commented 8 years ago

happens on sponge forge too @minecrell log incomming

xChristopher210 commented 8 years ago

http://paste.ubuntu.com/15011860/

gabizou commented 8 years ago

I have a potential fix coming in.

stephan-gh commented 8 years ago

Still happening on latest SpongeVanilla:

---- Minecraft Crash Report ----
// I blame Dinnerbone.

Time: 11/02/16 11:24
Description: Ticking entity

java.lang.IllegalArgumentException: A named cause already exists with the name: Attacker
    at org.spongepowered.api.event.cause.Cause.fromList(Cause.java:266)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:585)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:562)
    at org.spongepowered.common.event.CauseTracker.handleDroppedItems(CauseTracker.java:552)
    at org.spongepowered.common.event.CauseTracker.handlePostTickCaptures(CauseTracker.java:504)
    at net.minecraft.world.World.onCallEntityUpdate(SourceFile:298)
    at net.minecraft.world.World.func_72866_a(SourceFile:1408)
    at net.minecraft.world.WorldServer.func_72866_a(SourceFile:597)
    at net.minecraft.world.World.func_72870_g(SourceFile:1386)
    at net.minecraft.world.World.func_72939_s(SourceFile:1279)
    at net.minecraft.world.WorldServer.func_72939_s(SourceFile:478)
    at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:181)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299)
    at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535)
    at net.minecraft.server.MinecraftServer.run(SourceFile:451)
    at java.lang.Thread.run(Thread.java:745)

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

-- Head --
Stacktrace:
    at org.spongepowered.api.event.cause.Cause.fromList(Cause.java:266)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:585)
    at org.spongepowered.api.event.cause.Cause.with(Cause.java:562)
    at org.spongepowered.common.event.CauseTracker.handleDroppedItems(CauseTracker.java:552)
    at org.spongepowered.common.event.CauseTracker.handlePostTickCaptures(CauseTracker.java:504)
    at net.minecraft.world.World.onCallEntityUpdate(SourceFile:298)
    at net.minecraft.world.World.func_72866_a(SourceFile:1408)
    at net.minecraft.world.WorldServer.func_72866_a(SourceFile:597)
    at net.minecraft.world.World.func_72870_g(SourceFile:1386)

-- Entity being ticked --
Details:
    Entity Type: Squid (net.minecraft.entity.passive.EntitySquid)
    Entity ID: 2525
    Entity Name: Squid
    Entity's Exact location: 112.50, 55.00, -1.50
    Entity's Block location: 112.00,55.00,-2.00 - World: (112,55,-2), Chunk: (at 0,3,14 in 7,-1; contains blocks 112,0,-16 to 127,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Entity's Momentum: 0.00, -0.08, 0.00
    Entity's Rider: ~~ERROR~~ NullPointerException: null
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.world.World.func_72939_s(SourceFile:1279)
    at net.minecraft.world.WorldServer.func_72939_s(SourceFile:478)

-- Affected level --
Details:
    Level name: geoworld
    All players: 1 total; [EntityPlayerMP['Inscrutable'/622, l='geoworld', x=80.69, y=75.00, z=-39.21]]
    Chunk stats: ServerChunkCache: 783 Drop: 0
    Level seed: -8543150394070182754
    Level generator: ID 09 - overworld, ver 0. Features enabled: true
    Level generator options: 
    Level spawn location: -75.00,63.00,249.00 - World: (-75,63,249), Chunk: (at 5,3,9 in -5,15; contains blocks -80,0,240 to -65,255,255), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
    Level time: 9573705 game time, 1518425 day time
    Level dimension: 2
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
    at net.minecraft.server.MinecraftServer.func_71190_q(SourceFile:181)
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(SourceFile:299)
    at net.minecraft.server.MinecraftServer.func_71217_p(SourceFile:535)
    at net.minecraft.server.MinecraftServer.run(SourceFile:451)
    at java.lang.Thread.run(Thread.java:745)

-- System Details --
Details:
    Minecraft Version: 1.8.9
    Operating System: Linux (amd64) version 3.10.0-229.4.2.el7.x86_64
    Java Version: 1.8.0_65, Oracle Corporation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 480828440 bytes (458 MB) / 1710534656 bytes (1631 MB) up to 8555069440 bytes (8158 MB)
    JVM Flags: 5 total; -Xms1g -Xmx8G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    Plugins: 
        Plugin{id=minecraft, name=Minecraft, version=1.8.9}
        Plugin{id=statusprotocol, name=StatusProtocol, version=0.1-SNAPSHOT, source=mods/0statusprotocol-0.1.jar}
        Plugin{id=sponge, name=SpongeVanilla, version=1.8.9-3.1.0-BETA-244}
        Plugin{id=foxcore, name=FoxCore, version=0.7.0, source=mods/FoxCore-v0.7.0-74-SNAPSHOT-server.jar}
        Plugin{id=foxguard, name=FoxGuard, version=0.17.0, source=mods/FoxGuard-v0.17.0-210-SNAPSHOT.jar}
        Plugin{id=voxelsnipersponge, name=VoxelSniper-Sponge, version=7.1.0, source=mods/VoxelSniper-7.1.0-SNAPSHOT-all.jar}
        Plugin{id=blwarps, name=BLWarps, version=1.2.6, source=mods/BLWarps-1.2.6.jar}
        Plugin{id=CommandLogger, name=CommandLogger, version=1.0, source=mods/CommandLogger-1.0.0.jar}
        Plugin{id=musicbox, name=MusicBox, version=0.1, source=mods/musicbox-0.1.jar}
        Plugin{id=EssentialCmds, name=EssentialCmds, version=7.4b-1a795cc, source=mods/EssentialCmds-7.4b.jar}
        Plugin{id=GeoWorld, name=The Minecraft Geology Project, version=1.0.1a, source=mods/GeoWorld.jar}
        Plugin{id=nostalgiagen, name=NostalgiaGen, version=0.3, source=mods/nostalgiagen-0.3.1.jar}
        Plugin{id=JobsLite, name=JobsLite, version=1.2.0, source=mods/JobsLite-v1.2.0.jar}
        Plugin{id=PJW, name=Project Worlds, version=0.7.50, source=mods/projectworlds-3.1.0-v0.7.50.jar}
        Plugin{id=voidcraft, name=VoidCraft, version=0.1.0, source=mods/0VoidCraft.jar}
        Plugin{id=spongeapi, name=SpongeAPI, version=3.1.0-SNAPSHOT-4c0d27c}
        Plugin{id=worldedit, name=WorldEdit, version=6.1.1, source=mods/worldedit-spongevanilla-mc1.8.9-6.1.1-dist.jar}
        Plugin{id=TranslateWithBing, name=TranslateWithBing, version=1.1.1, source=mods/TranslateWithBing-1.1.1-all.jar}
        Plugin{id=PermissionsEx, name=PermissionsEx, version=2.0-SNAPSHOT, source=mods/PermissionsEx-Sponge.jar}
        Plugin{id=NoteBlockAPI, name=NoteBlockAPI, version=2.0, source=mods/noteblockapi-2.0.jar}
        Plugin{id=CraftBook, name=CraftBook, version=4.0, source=mods/CraftBook-4.0-SNAPSHOT-dist.jar}
        Plugin{id=EconomyLite, name=EconomyLite, version=1.1.4, source=mods/EconomyLite-v1.1.4.jar}
        Plugin{id=serverlistplus, name=ServerListPlus, version=3.4.1, source=mods/ServerListPlus-3.4.1-Universal.jar}
        Plugin{id=Tim, name=Tim the Enchanter, version=4.0.0, source=mods/TimTheEnchanter.jar}
        Plugin{id=AdminShop, name=AdminShop, version=1.3, source=mods/AdminShop-1.3e.jar}
    Profiler Position: N/A (disabled)
    Player Count: 1 / 32; [EntityPlayerMP['Inscrutable'/622, l='geoworld', x=80.69, y=75.00, z=-39.21]]
    Is Modded: Definitely; Server brand changed to 'SpongeVanilla'
    Type: Dedicated Server (map_server.txt)
gabizou commented 8 years ago

@Minecrell IT's still happening on SV because I haven't updated SV yet..... Otherwise the bug is actually fixed in SpongeCommon and SpongeForge.