From 519e4224b1ba73a99c58c8fc53aab003eb6af37a Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 9 Jun 2025 02:46:34 -0700 Subject: [PATCH] Fix infinite loop in RegionFile IO If an exception is thrown during decompress then the read process would be started again, which of course would eventually throw in the decompress process. --- .../patches/features/0015-Moonrise-optimisation-patches.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-server/patches/features/0015-Moonrise-optimisation-patches.patch b/paper-server/patches/features/0015-Moonrise-optimisation-patches.patch index d60aed7cd9..6959dec065 100644 --- a/paper-server/patches/features/0015-Moonrise-optimisation-patches.patch +++ b/paper-server/patches/features/0015-Moonrise-optimisation-patches.patch @@ -1138,7 +1138,7 @@ index 0000000000000000000000000000000000000000..a814512fcfb85312474ae2c2c2144384 +} diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java new file mode 100644 -index 0000000000000000000000000000000000000000..1acea58838f057ab87efd103cbecb6f5aeaef393 +index 0000000000000000000000000000000000000000..25bceb88f7d040034a740c18ed5a3aab50b0c72b --- /dev/null +++ b/ca/spottedleaf/moonrise/patches/chunk_system/io/MoonriseRegionFileIO.java @@ -0,0 +1,1700 @@ @@ -2287,7 +2287,7 @@ index 0000000000000000000000000000000000000000..1acea58838f057ab87efd103cbecb6f5 + LOGGER.error("Failed to decompress chunk data for task: " + this.toString(), thr); + } + -+ if (compoundTag == null) { ++ if (throwable == null && compoundTag == null) { + // need to re-try from the start + this.scheduleReadIO(); + return;