Mojira Archive
MC-100382

DEV - Pathfinding Memory Leak

We have identified a memory leak in Minecraft's Pathfinding System.
In MCP Naming, the NodeProcessor class (PathfinderAbstract in mc-dev naming) is the culprit.

First parameter is IBlockAccess, which is set by the first method in the class. This parameter is set to an instance of a Chunk Cache.

However, the 2nd method called postProcess in MCP, never cleans up this reference.

This causes an Entity's Pathfinding instances to hold onto a reference of a ChunkCache.

This ChunkCache then holds references to many Chunks, even after they unload.

These unloaded chunks then hold references to other leaked Entity objects, who also have references to Pathfinders...

This leaks to potential to create a chain of leaked objects.

Fixed

Aikar

2016-04-01, 02:39 AM

2018-06-28, 10:31 PM

2016-04-01, 11:47 AM

6

14

Unconfirmed

memory-leak

Minecraft 1.9.2

Minecraft 16w14a