Spigot unexpected Exception

Discussion in 'Spigot Plugin Development' started by SecureBit, Aug 10, 2018.

  1. Has any one of you ever seen an exception like this?

    [10:53:17 WARN]: [Citizens] Task #10 for Citizens v2.0.23-SNAPSHOT (build Unknown) generated an exception
    java.util.concurrent.RejectedExecutionException: Executor already shutdown
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.startTask(MoreExecutors.java:323) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:258) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1714) ~[?:?]
    at java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:1931) ~[?:?]
    at net.minecraft.server.v1_13_R1.Scheduler.b(SourceFile:61) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.SchedulerBatch.a(SourceFile:39) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.generateChunk(ChunkProviderServer.java:176) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.generateChunk(ChunkProviderServer.java:166) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:127) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getChunkAt(World.java:268) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getChunkAtWorldCoords(World.java:264) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getType(World.java:647) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at org.bukkit.craftbukkit.v1_13_R1.block.CraftBlock.getType(CraftBlock.java:174) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.citizensnpcs.nms.v1_13_R1.entity.MobEntityController.createEntity(MobEntityController.java:33) ~[?:?]
    at net.citizensnpcs.npc.AbstractEntityController.spawn(AbstractEntityController.java:41) ~[?:?]
    at net.citizensnpcs.nms.v1_13_R1.entity.HorseController.spawn(HorseController.java:41) ~[?:?]
    at net.citizensnpcs.npc.CitizensNPC.spawn(CitizensNPC.java:202) ~[?:?]
    at net.citizensnpcs.npc.CitizensNPC.load(CitizensNPC.java:142) ~[?:?]
    at net.citizensnpcs.api.npc.SimpleNPCDataStore.loadInto(SimpleNPCDataStore.java:59) ~[?:?]
    at net.citizensnpcs.Citizens$2.run(Citizens.java:306) ~[?:?]
    at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:361) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.w(MinecraftServer.java:877) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.DedicatedServer.w(DedicatedServer.java:411) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.v(MinecraftServer.java:819) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.run(MinecraftServer.java:717) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at java.lang.Thread.run(Thread.java:844) [?:?]

    I think that this has something to do with the schedulers from bukkit. The method(s) above is executed in an BukkitScheduler#runTask(...) registered in JavaPlugin#onEnable.

    Just write a comment if you have seen something like this. Would help me fixing this issue a lot ;)
     
    #1 SecureBit, Aug 10, 2018
    Last edited: Aug 10, 2018
  2. The server has been reloaded / shutdown while you scheduled something (can't see what exactly, the stack trace has been cut off at a Block::getType() call)
     
  3. But the error occurs immediately after the server finished starting. When registering a task in an onEnable method of bukkit, the task will be executed after all plugins are enabled all worlds are loaded etc. What does that have to do with reload or shut down. I don’t actually get the point here.

    PS: Accendely failed copying the stacktrace

    [10:53:17 WARN]: [Citizens] Task #10 for Citizens v2.0.23-SNAPSHOT (build Unknown) generated an exception
    java.util.concurrent.RejectedExecutionException: Executor already shutdown
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.startTask(MoreExecutors.java:323) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:258) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at java.util.concurrent.CompletableFuture.asyncSupplyStage(CompletableFuture.java:1714) ~[?:?]
    at java.util.concurrent.CompletableFuture.supplyAsync(CompletableFuture.java:1931) ~[?:?]
    at net.minecraft.server.v1_13_R1.Scheduler.b(SourceFile:61) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.SchedulerBatch.a(SourceFile:39) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.generateChunk(ChunkProviderServer.java:176) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.generateChunk(ChunkProviderServer.java:166) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:127) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getChunkAt(World.java:268) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getChunkAtWorldCoords(World.java:264) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.World.getType(World.java:647) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at org.bukkit.craftbukkit.v1_13_R1.block.CraftBlock.getType(CraftBlock.java:174) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.citizensnpcs.nms.v1_13_R1.entity.MobEntityController.createEntity(MobEntityController.java:33) ~[?:?]
    at net.citizensnpcs.npc.AbstractEntityController.spawn(AbstractEntityController.java:41) ~[?:?]
    at net.citizensnpcs.nms.v1_13_R1.entity.HorseController.spawn(HorseController.java:41) ~[?:?]
    at net.citizensnpcs.npc.CitizensNPC.spawn(CitizensNPC.java:202) ~[?:?]
    at net.citizensnpcs.npc.CitizensNPC.load(CitizensNPC.java:142) ~[?:?]
    at net.citizensnpcs.api.npc.SimpleNPCDataStore.loadInto(SimpleNPCDataStore.java:59) ~[?:?]
    at net.citizensnpcs.Citizens$2.run(Citizens.java:306) ~[?:?]
    at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:361) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.w(MinecraftServer.java:877) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.DedicatedServer.w(DedicatedServer.java:411) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.v(MinecraftServer.java:819) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at net.minecraft.server.v1_13_R1.MinecraftServer.run(MinecraftServer.java:717) [spigot-1.13.jar:git-Spigot-417cfb3-eb36029]
    at java.lang.Thread.run(Thread.java:844) [?:?]