Strange Error Message (Player teleport ?)

Discussion in 'Plugin Development' started by Terradominik, Aug 12, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Terradominik

    Hey, in my plugin i teleport up to 30 players at once, sometimes, the following error occures:

    Code:
    2012-08-12 12:40:28 [SEVERE] java.util.ConcurrentModificationException
    2012-08-12 12:40:28 [SEVERE]    at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    2012-08-12 12:40:28 [SEVERE]    at java.util.ArrayList$Itr.next(Unknown Source)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.WorldServer.getTileEntities(WorldServer.java:533)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.EntityPlayer.h_(EntityPlayer.java:165)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.World.entityJoinedWorld(World.java:1239)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:498)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.World.playerJoinedWorld(World.java:1221)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.World.tickEntities(World.java:1119)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:567)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
    2012-08-12 12:40:28 [SEVERE]    at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    2012-08-12 12:40:28 [SEVERE] Encountered an unexpected exception ConcurrentModificationException
    java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
        at java.util.ArrayList$Itr.next(Unknown Source)
        at net.minecraft.server.WorldServer.getTileEntities(WorldServer.java:533)
        at net.minecraft.server.EntityPlayer.h_(EntityPlayer.java:165)
        at net.minecraft.server.World.entityJoinedWorld(World.java:1239)
        at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:498)
        at net.minecraft.server.World.playerJoinedWorld(World.java:1221)
        at net.minecraft.server.World.tickEntities(World.java:1119)
        at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:567)
        at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:212)
        at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:476)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
    I implemented a AsyncTask to port the players every 10 Tticks, because i think its because of the teleportaion, wich worked a while with ~10 players, but with 20 players the server still crashes (sometimes).

    Does Anyone have an idea to fix this ?

    (sry for my bad english)
    - Terra
     
  2. Offline

    Njol

    use a sync task
     
    Terradominik likes this.
  3. He was probably using a synch task at frst and then went over to ASync task to try and fix the issue.
     
Thread Status:
Not open for further replies.

Share This Page