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 6327447259
commit c82b292ab0
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
2 changed files with 93 additions and 6 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"