9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-23 08:49:28 +00:00
Files
Gale/gale-server/paper-patches/features/0008-Print-stack-trace-for-plugins-not-shutting-down-task.patch
Dreeam-qwq a224af131c Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@13c80a5e [ci/skip] Fix PlayerShearBlockEvent javadoc typos (#12101)
PaperMC/Paper@db2aa180 [ci/skip] Fix incomplete example in javadocs for PreFlattenTagRegistrar (#12102)
PaperMC/Paper@cf7c6c74 [ci/skip] Fix incomplete example in javadocs for PostFlattenTagRegistrar (#12103)
PaperMC/Paper@072a8317 Add proper attached blocks API to AbstractArrow (#12099)
PaperMC/Paper@1be2e5f3 Fix vanilla map decorations sending when not dirty (#12098)
PaperMC/Paper@a06179a0 Update entity effect (#12104)
PaperMC/Paper@e616498e Add Vault block API (#12068)
PaperMC/Paper@0a04c3fe Fix some NPEs (#12105)
PaperMC/Paper@06804850 Expand TrialSpawner API (#12025)
PaperMC/Paper@46f4fdaa Add support for rotation argument handling (#12090)
2025-02-13 00:12:48 +00:00

51 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Wed, 23 Nov 2022 20:28:07 +0100
Subject: [PATCH] Print stack trace for plugins not shutting down tasks
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
This patch is based on the following patch:
"More debug for plugins not shutting down tasks"
By: Paul Sauve <paul@technove.co>
As part of: Airplane (https://github.com/TECHNOVE/Airplane)
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
* Airplane copyright *
Airplane
Copyright (C) 2020 Technove LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 32ac42ec69810470941c29f7add34d03e46b4712..ae90120eab182fcb975a13c84eed1425dc09da46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1183,6 +1183,13 @@ public final class CraftServer implements Server {
plugin.getPluginMeta().getDisplayName(),
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
));
+ // Gale start - Airplane - print stack trace for plugins not shutting down tasks
+ getLogger().log(Level.SEVERE, String.format("%s Stacktrace", worker.getThread().getName()));
+
+ for (StackTraceElement element : worker.getThread().getStackTrace()) {
+ getLogger().log(Level.SEVERE, " " + element);
+ }
+ // Gale end - Airplane - print stack trace for plugins not shutting down tasks
if (console.isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread(worker.getThread(), "still running"); // Paper - Debugging
}
}