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

Fix race condition in COFH's oredict initialization #466

Merged
merged 2 commits into from
Jan 3, 2025
Merged

Conversation

Lyfts
Copy link
Member

@Lyfts Lyfts commented Jan 3, 2025

Closes GTNewHorizons/GT-New-Horizons-Modpack#18239

The issue only happens in SP and was caused by a race condition between the server & client threads. (also wtf it re-initializes this every time a player joins???)

Disregard that the injected method is annotated with @Mod.EventHandler it calls it itself in various places.

https://github.com/GTNewHorizons/CoFHCore/blob/4be193afe63bcf108c5ad5abd34da34028434c65/src/main/java/cofh/core/util/FMLEventHandler.java#L38

https://github.com/GTNewHorizons/CoFHCore/blob/4be193afe63bcf108c5ad5abd34da34028434c65/src/main/java/cofh/CoFHCore.java#L191 - this is the one responsible for the race condition

@Lyfts Lyfts requested a review from a team January 3, 2025 16:08
@serenibyss serenibyss enabled auto-merge (squash) January 3, 2025 16:47
@serenibyss serenibyss merged commit 8b79e63 into master Jan 3, 2025
1 check passed
@serenibyss serenibyss deleted the fix-cofh-cme branch January 3, 2025 16:50
@Dream-Master Dream-Master added the safe for stable Bugfix with low break chance for patch releases label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe for stable Bugfix with low break chance for patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash to menu on creating a new SP world
4 participants