MCTCP / TerrainControl

Minecraft Terrain Generator for SpigotMC and Forge
https://www.spigotmc.org/threads/terraincontrol.37980/
MIT License
230 stars 163 forks source link

[Bukkit] ConcurrentModificationException #552

Open SpiderRobotMan opened 6 years ago

SpiderRobotMan commented 6 years ago

This occurs when trying to load terrain on our server, we do have custom generation and structures setup.

---- Minecraft Crash Report ----
// On the bright side, I bought you a teddy bear!

Time: 10/15/17 12:54 PM
Description: Exception ticking world

java.util.ConcurrentModificationException
    at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
    at java.util.LinkedList$ListItr.next(LinkedList.java:888)
    at net.minecraft.server.v1_12_R1.StructureStart.a(SourceFile:40)
    at net.minecraft.server.v1_12_R1.StructureGenerator.a(StructureGenerator.java:87)
    at com.khorn.terraincontrol.bukkit.BukkitWorld.placeDefaultStructures(BukkitWorld.java:258)
    at com.khorn.terraincontrol.generator.ObjectSpawner.populate(ObjectSpawner.java:59)
    at com.khorn.terraincontrol.bukkit.generator.TXBlockPopulator.populate(TXBlockPopulator.java:25)
    at net.minecraft.server.v1_12_R1.Chunk.a(Chunk.java:1064)
    at net.minecraft.server.v1_12_R1.Chunk.loadNearby(Chunk.java:1028)
    at net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetChunkAt(ChunkProviderServer.java:200)
    at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:167)
    at net.minecraft.server.v1_12_R1.PlayerChunk.a(PlayerChunk.java:121)
    at net.minecraft.server.v1_12_R1.PlayerChunkMap.flush(PlayerChunkMap.java:179)
    at net.minecraft.server.v1_12_R1.WorldServer.doTick(WorldServer.java:325)
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:897)
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426)
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767)
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665)
    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.LinkedList$ListItr.checkForComodification(LinkedList.java:966)
    at java.util.LinkedList$ListItr.next(LinkedList.java:888)
    at net.minecraft.server.v1_12_R1.StructureStart.a(SourceFile:40)
    at net.minecraft.server.v1_12_R1.StructureGenerator.a(StructureGenerator.java:87)
    at com.khorn.terraincontrol.bukkit.BukkitWorld.placeDefaultStructures(BukkitWorld.java:258)
    at com.khorn.terraincontrol.generator.ObjectSpawner.populate(ObjectSpawner.java:59)
    at com.khorn.terraincontrol.bukkit.generator.TXBlockPopulator.populate(TXBlockPopulator.java:25)
    at net.minecraft.server.v1_12_R1.Chunk.a(Chunk.java:1064)
    at net.minecraft.server.v1_12_R1.Chunk.loadNearby(Chunk.java:1028)
    at net.minecraft.server.v1_12_R1.ChunkProviderServer.originalGetChunkAt(ChunkProviderServer.java:200)
    at net.minecraft.server.v1_12_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:167)
    at net.minecraft.server.v1_12_R1.PlayerChunk.a(PlayerChunk.java:121)
    at net.minecraft.server.v1_12_R1.PlayerChunkMap.flush(PlayerChunkMap.java:179)
    at net.minecraft.server.v1_12_R1.WorldServer.doTick(WorldServer.java:325)

-- Affected level --
Details:
    Level name: world
    All players: 1 total; [EntityPlayer['SpiderRobotMan'/58, l='world', x=649.65, y=199.59, z=1215.14](SpiderRobotMan at 649.6523518077091,199.59011601112618,1215.140638461338)]
    Chunk stats: ServerChunkCache: 873 Drop: 0
    Level seed: 1354759320588429427
    Level generator: ID 00 - default, ver 1. Features enabled: true
    Level generator options: 
    Level spawn location: World: (114,64,576), Chunk: (at 2,4,0 in 7,36; contains blocks 112,0,576 to 127,255,591), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023)
    Level time: 106702726 game time, 81209360 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 15810 (now: false), thunder time: 27367 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
Stacktrace:
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:897)
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426)
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767)
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665)
    at java.lang.Thread.run(Thread.java:748)

-- System Details --
Details:
    Minecraft Version: 1.12.2
    Operating System: Linux (amd64) version 4.4.0-92-generic
    Java Version: 1.8.0_131, Oracle Corporation
    Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 137426440 bytes (131 MB) / 392167424 bytes (374 MB) up to 3221225472 bytes (3072 MB)
    JVM Flags: 13 total; -Xmx3072M -Xms256M -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=45 -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    CraftBukkit Information: 
   Running: Paper version git-Paper-1237 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT) false
bloodmc commented 6 years ago

I don't see anything wrong on TC's side. Looks like there is something else running code async which is causing the CME. Remove all plugins except TC and provide a full server log if crash occurs again.

SpiderRobotMan commented 6 years ago

@bloodmc Hrm, we shouldn't have any other plugins trying to do anything to the terrain during generation. It seems to only crash like this when a structure (mineshaft?) tries to generate.

I'll give it another go when I have a moment.