Edge case in generation system when external systems (e.g. in plugins) lock chunks #6680
Labels
Category: Core
Related to internal functionality
Status: Debugged
Cause of the bug has been found, but not fixed
Uh oh!
There was an error while loading. Please reload this page.
Problem description
World->lockChunk()
is used for advisory locking for async worldgen. Async generation won't take place if a chunk is locked.However, we don't account for the possibility that the source of the chunk locking wasn't the generation subsystem. The assumption here that a generation request has locked the chunk is problematic:
PocketMine-MP/src/world/World.php
Line 3447 in 51cf681
A deferred generation request is pushed onto the queue, but because the queue drainage is only triggered by other generation tasks completing, if there are no additional tasks, the request will never get processed.
This bug requires a conjunction of two things:
Proposed solution
Some possible options come to mind:
World->unlockChunk()
to trigger stuff like population queue flushes - although this might get complicated during generation callbacksAlternative solutions or workarounds
No response
The text was updated successfully, but these errors were encountered: