Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit recursive block updates to prevent stack overflow crashes #424

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

eigenraven
Copy link
Member

Some configurations of water and lava can cause infinite recursive block update loops (this seems to be a vanilla bug), this is not a full fix but it at least stops crashes from happening and replaces them with logging.

Tested by setting the limit to a very low value in dev and observing suppressed block updates during worldgen.

@eigenraven eigenraven requested a review from a team September 21, 2024 10:37
@eigenraven eigenraven self-assigned this Sep 21, 2024
Copy link
Member

@Alexdoru Alexdoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand your mixin correctly, it's going to increment the hodgepodge$currentBlockUpdateRecursiveCalls counter every time there is a block update on the server - for any block - and once it reaches 256 it will cancel all the block updates - for any block- that's just breaking the behavior of the minecraft server

@eigenraven eigenraven merged commit 0113edb into master Sep 21, 2024
1 check passed
@eigenraven eigenraven deleted the cofh-water-cascade-fix-raven branch September 21, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants