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

failed map loading after several times of execution

XMLWordPrintable

    • CraftBukkit version git-Spigot-37d799b-3eb7236 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
    • Yes

      loading/creating maps after several times causes `java.lang.IllegalArgumentException: World unloaded`.

      I only try to load a map via:

      Bukkit.getServer().createWorld(new WorldCreator(mapName));
      

      followed by a teleportation to this newly loaded world.

      The map gets saved properly:

      ThreadedAnvilChunkStorage (testMap): All chunks are saved

      I repeat this procedure, by loading and unloading this map again, 2 times, and it throws this exception:

      Stacktrace:

       java.lang.IllegalArgumentException: World unloaded
         at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
         at org.bukkit.Location.getWorld(Location.java:112)
         at org.bukkit.Location.serialize(Location.java:1096)
         at dev.dementisimus.mapcreator.creator.AbstractCreator.lambda$load$8(AbstractCreator.java:235)
         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
         at java.base/java.lang.Thread.run(Thread.java:834)
      

      After some more testing, it is clear now, that this bug only affects one world, e.g: if I load world MyWorld 2 times, this Exception gets thrown, and if I load another map after this Exception has been thrown, there's again a counter of 2, till this Exception'll be thrown again.

      I've already tried it with a cooldown (10sec) after loading this map in, but this does not solve this.

            Unassigned Unassigned
            dementisimus Stefan Johannes Grabner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: