From 755ba081f2e6bcbb96b836b0c4f2fe4c4d3693bb Mon Sep 17 00:00:00 2001 From: David Date: Mon, 21 Apr 2014 17:01:24 +1000 Subject: [PATCH] Swallow StackOverflowError when updating physics. Prevents an otherwise unneeded crash. --- ...kOverflowError-when-updating-physics.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 CraftBukkit-Patches/0141-Swallow-StackOverflowError-when-updating-physics.patch diff --git a/CraftBukkit-Patches/0141-Swallow-StackOverflowError-when-updating-physics.patch b/CraftBukkit-Patches/0141-Swallow-StackOverflowError-when-updating-physics.patch new file mode 100644 index 000000000..fbc792e9b --- /dev/null +++ b/CraftBukkit-Patches/0141-Swallow-StackOverflowError-when-updating-physics.patch @@ -0,0 +1,25 @@ +From 68d31fb7ae5082fdb5cb31fe42304d751028a92e Mon Sep 17 00:00:00 2001 +From: David +Date: Mon, 21 Apr 2014 17:00:53 +1000 +Subject: [PATCH] Swallow StackOverflowError when updating physics. + +Prevents an otherwise unneeded crash. + +diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java +index 52ed625..6dcf6ee 100644 +--- a/src/main/java/net/minecraft/server/World.java ++++ b/src/main/java/net/minecraft/server/World.java +@@ -531,6 +531,10 @@ public abstract class World implements IBlockAccess { + // CraftBukkit end + + block1.doPhysics(this, i, j, k, block); ++ // Spigot start - Prevent NoClassDefFoundError and unneeded crash ++ } catch (StackOverflowError ignore) { ++ Bukkit.getLogger().severe("Encountered stack overflow whilst updating neighbours"); ++ // Spigot end + } catch (Throwable throwable) { + CrashReport crashreport = CrashReport.a(throwable, "Exception while updating neighbours"); + CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Block being updated"); +-- +1.9.1 +