Plot-System icon indicating copy to clipboard operation
Plot-System copied to clipboard

[Bug] - Handle Schem Load issues

Open Zoriot opened this issue 5 months ago • 0 comments

Description

When schem cannot be loaded don't try to / kill, the runner task, to stop it properly. Also, many other code parts should be reanalyzed if it's properly handled when something goes wrong. Also the Plots are removed from the Pool, which is quite Bad.

Steps to Reproduce

  1. Sapotage the server so it cannot load the schematics (permission wise or just use zap)
  2. Try to load a schem either with tutorial or plots.
  3. Watch the beautiful exception spam the log & only stops when stopping the Server

Possible Solution

Just handle it the right way & don't start the npc task runner + there could be some code preventing this too.

Additional Info

Log:

! [Sun 09:05:03 WARN  FancyNpcs] Plugin FancyNpcs v2.4.2 generated an exception while executing task 36
java.lang.NullPointerException: Cannot invoke "de.oliver.fancynpcs.api.Npc.getData()" because the return value of "com.alpsbte.plotsystem.core.system.tutorial.utils.TutorialNPC.getNpc()" is null
    at PlotSystem-4.1.4.jar//com.alpsbte.plotsystem.core.system.tutorial.utils.TutorialNPCTurnTracker.run(TutorialNPCTurnTracker.java:39)
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
    at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)

Issue happend on a old server, so its resolved & not critical for now with switching to a better one which handles it fine. That the Schem could not be loaded. Maybe its related to CRAC jvm too.

If more infos are needed, you can ask me or @KisosMk | Co Owner from BTE Israel.

Zoriot avatar Jul 11 '25 21:07 Zoriot