Prevent NoClassDefError crash and notify on crash

By: David <dmck2b@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2014-04-21 12:43:08 +01:00
parent f1087e18c1
commit 8b9d2faa11
3 changed files with 37 additions and 18 deletions

View File

@@ -74,6 +74,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.world.level.Level.lastPhysicsProblem != null )
{
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.world.level.Level.lastPhysicsProblem );
}
//
log.log( Level.SEVERE, "------------------------------" );
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );