Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-626

Spigot fails to populate some chunks with a custom World Generator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None

      Spigot/Craftbukkit will fail to populate a large number of chunks when using a custom world generator. This happens mostly when the world is being generated for the first time at startup.

      at line 283 of net.minecraft.server.ChunkProviderServer there is a try/finally block around the population loop. This seems to fail quite often at initial load of the world, I'm guessing probably a race condition somewhere causing a ConcurrentModificationException causing populator.populate to never be called, however, the ChunkPopulateEvent IS called.

      net.minecraft.server.ChunkProviderServer.java
              |     try {
           282|       for (BlockPopulator populator : world.getPopulators())
           283|         populator.populate(world, random, chunk.bukkitChunk);
              |     }
              |     finally {
           286|       this.world.populating = false;
              |     }
      

      This can be worked around by listening to the ChunkPopulateEvent and checking if it is called without first calling the populator.populate method. If it is, you can recall the populate method.

      As you can see, it fails to populate a lot of chunks

      [14:08:50 INFO]: Failed to populate -5:31.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -6:30.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -8:29.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -6:29.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -7:29.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -7:28.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -8:28.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -1:30.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 0:29.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -1:28.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate -1:29.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:19.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 11:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 11:19.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 13:17.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:17.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 8:15.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 3:24.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 11:27.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 11:30.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:22.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:16.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 25:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 25:17.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 24:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 24:17.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 18:10.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 36:0.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 20:2.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 19:2.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 20:7.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 17:11.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 4:3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 5:3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 21:-3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 25:3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 20:6.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 21:3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 22:4.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 24:3.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 22:5.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 14:14.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 15:14.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 16:14.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 15:15.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:15.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 13:14.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 12:14.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 17:15.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 16:15.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 20:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 19:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 18:18.. Attempting to repopulate.
      [14:08:50 INFO]: Failed to populate 18:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 17:18.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 23:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 27:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 25:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 24:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 28:25.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 28:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 26:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 25:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 24:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 24:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 26:18.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 23:19.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 23:18.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 26:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 25:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 24:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 25:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 24:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 23:20.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 27:19.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 26:19.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 27:18.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 25:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 27:20.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 35:7.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 34:7.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 34:6.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 33:5.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 33:6.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 23:4.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 3:25.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:30.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:30.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:29.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:28.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:27.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:27.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 8:30.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 17:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 17:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 20:31.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 19:30.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 18:29.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 18:28.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:26.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:25.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 14:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 13:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 13:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:22.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:23.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:26.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:26.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:26.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:29.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:29.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:28.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:28.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:25.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:24.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 13:18.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 13:19.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 16:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 13:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 12:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:9.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 8:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:9.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:8.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:8.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:8.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:7.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:7.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:6.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:6.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:5.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:4.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 8:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 9:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 8:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:17.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 3:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 10:16.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 11:15.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:9.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:9.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 3:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:11.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 5:10.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:10.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 7:10.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 6:10.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate -4:14.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate -2:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate -3:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate -3:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 2:12.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 4:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 3:13.. Attempting to repopulate.
      [14:08:51 INFO]: Failed to populate 2:11.. Attempting to repopulate.
      

            Thinkofdeath Thinkofname
            Double0negative Double0negative
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: