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 ConcurrentModificationException updating sound volumes #251

Merged

Conversation

LostLuma
Copy link
Collaborator

@LostLuma LostLuma commented Mar 20, 2025

Resolves #220
Resolves #224
Resolves #250

Instead of iterating over the map of active sounds we now take a copy of the keys, iterate over that, and manually get the values from the map, checking for missing ones. This should make it impossible for a key/value pair being removed from the map in the background to throw a ConcurrentModificationException.

Signed-off-by: Lilly Rose Berner <lilly@lostluma.net>
@LostLuma LostLuma force-pushed the fix/sound-engine-concurrent-modification branch from 1a3c63a to 2af9c06 Compare March 20, 2025 09:59
@LostLuma LostLuma merged commit f35a471 into juliand665:main Mar 25, 2025
2 checks passed
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.

Crash 1.21.1 NeoForge crash: Unreported exception thrown! Unexpected CME error (crash)
1 participant