Fix pooled buffer leak resulting in dynmap black spots - Fixes #3386

Dynmap accessed the raw bytes because it utilized NBT locally, but the
NBTTagcompound was garbage collected while the bytes were still being used.

This will return getBytes() back to being safe, and add a new PoolSafe method
that will prevent the additional allocations for general chunk loading.

Also fixed applyPatches for people with paths in their working directory
if they have mcdev sources built.
This commit is contained in:
Aikar
2020-05-20 00:51:28 -04:00
parent c5bb0ccf0a
commit ade297307f
2 changed files with 90 additions and 3 deletions

View File

@ -92,14 +92,14 @@ echo "Importing MC Dev"
./scripts/importmcdev.sh "$basedir" || exit 1
# Apply paper
cd "$basedir"
(
applyPatch "work/Spigot/Spigot-API" Paper-API HEAD &&
applyPatch "work/Spigot/Spigot-Server" Paper-Server HEAD
cd "$basedir"
# if we have previously ran ./paper mcdev, update it
if [ -d "$workdir/Minecraft/$minecraftversion/src" ]; then
$basedir/scripts/makemcdevsrc.sh $basedir
./scripts/makemcdevsrc.sh "$basedir"
fi
) || (
echo "Failed to apply Paper Patches"