IntellectualSites / IntellectualSites/PlotSquared
Handle invalid config entries gracefully
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 653
- Forks
- 975
- Avg merge
- 2m
- Merged PRs (30d)
- 6
Description
Server Implementation
Paper
Server Version
1.17.1
Describe the bug
Setting a negative value for max-tiles in the chunk processor causes a massive amount of console spam and seems to delete all tile entities in loaded chunks.
To Reproduce
- Place some chests in a chunk
- Enable chunk processor and set
max-tilesto-1 - Restart server and join
- Chests are gone and massive console spam
Expected behaviour
At the very least, not spam the console and not delete blocks.
Screenshots / Videos
No response
Error log (if applicable)
https://paste.gg/p/anonymous/fe62defc051e457e95f59f5c29e9bef1
Plot Debugpaste
https://athion.net/ISPaster/paste/view/e45b3c123ebb475c80f7f18063589926
PlotSquared Version
6.2.3-SNAPSHOT
Checklist
- I have included a Plot debugpaste.
- I am using the newest build from https://www.spigotmc.org/resources/77506/ and the issue still persists.
Anything else?
Scared the crap out of me and I terminated the server as soon as I saw it so that none of the chunks would save in this state. This also happened on version 6.1.5, which I updated to the latest version (6.2.3) and tested again for this report. Results were the same. The provided error log is just the single error, as far as I can tell this is the only one but it spammed thousands of lines per second. I anticipated this would disable the check for tile entities in the chunk processor. I am using a different plugin (Insights) for block entity limits, which I disabled, so it is not interfering with PS and didn't cause this bug. If negative values simply can't be supported, it would be at least be nice if doing so anyway wouldn't delete blocks and just disable the processor. I really think that it should be supported as an "uncapped" limit though, as I want to use the max-entities limit but have an uncapped max-tiles limit. I am unsure if any value below 1 would have the same result, I just know that -1 does.
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 at the chunk processor entry point that handles the max-tiles configuration, then reproduce the issue with max-tiles set to -1 using the listed reproduction steps. Done means invalid values no longer produce console spam or delete tile entities, with behavior checked against the supplied error log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100