Reading a BlockState from a LimitedRegion in a BlockTransformer of the AsyncStructureGenerateEvent causes a server crash
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Expected behavior
When accessing blocks in a LimitedRegion provided in world generation can cause the server to try load a chunk (most likely the same chunk in this case) locking both the common worker that is generating the chunk which provided the LimitedRegion as well as the Server Thread which is currently waiting for the common worker.
Observed/Actual behavior
Accessing blocks in a LimitedRegion in world generation to not cause a thread dead lock
Steps/models to reproduce
- Install a plugin which uses the AsyncStructureGenerateEvent and accesses blocks within the event
- Generate loads of chunks (possibly using a plugin like Chunky)
- Have it happen sometime
Plugin and Datapack List
JustLootIt
Chunky
Paper version
This server is running Paper version 1.21.8-40-main@f866a5f (2025-08-19T16:05:02Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
Other
I was told to open this issue on discord.
This is related to https://github.com/Lauriichan/JustLootIt/issues/32 (log from the issue: https://mclo.gs/IRe1VVp)
If JustLootIt is used to reproduce it the code related to this issue can be found here:
https://github.com/Lauriichan/JustLootIt/blob/master/justlootit-core/src/main/java/me/lauriichan/spigot/justlootit/listener/StructureListener.java#L112
https://github.com/Lauriichan/JustLootIt/blob/master/justlootit-core/src/main/java/me/lauriichan/spigot/justlootit/util/BlockUtil.java#L151
I will add further information once I got more
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AsyncStructureGenerateEvent and the linked JustLootIt entry points, StructureListener.java and BlockUtil.java, to reproduce block access through LimitedRegion during world generation. Use Chunky to generate many chunks and check whether the server and generation worker deadlock. Done means accessing blocks in the event no longer causes the server crash or deadlock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100