2018-11-14 14:20:34 +11:00
|
|
|
From 54068e78f245b5fb362b59ef1bb44efc149d7467 Mon Sep 17 00:00:00 2001
|
2014-04-23 12:44:02 +01:00
|
|
|
From: David <dmck2b@gmail.com>
|
|
|
|
Date: Mon, 21 Apr 2014 12:43:08 +0100
|
|
|
|
Subject: [PATCH] Prevent NoClassDefError crash and notify on crash
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
2018-10-23 06:00:00 +11:00
|
|
|
index 450f167d9..fe1979b3a 100644
|
2014-04-23 12:44:02 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/World.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/World.java
|
2018-08-26 12:00:00 +10:00
|
|
|
@@ -136,6 +136,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2016-03-01 08:33:06 +11:00
|
|
|
|
|
|
|
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
|
|
|
private boolean guardEntityList; // Spigot
|
2014-04-23 12:44:02 +01:00
|
|
|
+ public static boolean haveWeSilencedAPhysicsCrash;
|
|
|
|
+ public static String blockLocation;
|
|
|
|
|
2016-03-01 08:33:06 +11:00
|
|
|
public CraftWorld getWorld() {
|
|
|
|
return this.world;
|
2018-08-26 12:00:00 +10:00
|
|
|
@@ -536,6 +538,10 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
2014-11-26 08:27:08 +11:00
|
|
|
}
|
2014-04-23 12:44:02 +01:00
|
|
|
// CraftBukkit end
|
2016-11-17 12:41:12 +11:00
|
|
|
iblockdata.doPhysics(this, blockposition, block, blockposition1);
|
2014-04-23 12:44:02 +01:00
|
|
|
+ } catch (StackOverflowError stackoverflowerror) { // Spigot Start
|
|
|
|
+ haveWeSilencedAPhysicsCrash = true;
|
2016-11-17 12:41:12 +11:00
|
|
|
+ blockLocation = blockposition.getX() + ", " + blockposition.getY() + ", " + blockposition.getZ();
|
|
|
|
+ // Spigot End
|
2014-04-23 12:44:02 +01:00
|
|
|
} catch (Throwable throwable) {
|
|
|
|
CrashReport crashreport = CrashReport.a(throwable, "Exception while updating neighbours");
|
|
|
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Block being updated");
|
|
|
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
2018-07-22 12:00:00 +10:00
|
|
|
index de08ad67f..94a3d4237 100644
|
2014-04-23 12:44:02 +01:00
|
|
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
|
|
@@ -60,6 +60,13 @@ public class WatchdogThread extends Thread
|
|
|
|
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
|
|
|
log.log( Level.SEVERE, "Spigot version: " + Bukkit.getServer().getVersion() );
|
|
|
|
//
|
|
|
|
+ if(net.minecraft.server.World.haveWeSilencedAPhysicsCrash)
|
|
|
|
+ {
|
|
|
|
+ log.log( Level.SEVERE, "------------------------------" );
|
|
|
|
+ log.log( Level.SEVERE, "During the run of the server, a physics stackoverflow was supressed" );
|
|
|
|
+ log.log( Level.SEVERE, "near " + net.minecraft.server.World.blockLocation);
|
|
|
|
+ }
|
|
|
|
+ //
|
|
|
|
log.log( Level.SEVERE, "------------------------------" );
|
|
|
|
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
|
|
|
|
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log );
|
|
|
|
--
|
2018-11-14 14:20:34 +11:00
|
|
|
2.19.1
|
2014-04-23 12:44:02 +01:00
|
|
|
|