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 async alias loading on 1.19.4 #7247

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

Efnilite
Copy link
Member

@Efnilite Efnilite commented Dec 8, 2024

Description

Fixes async alias loading on 1.19.4's JUnit run.

What went wrong
While loading the aliases, SimpleEntityData's simple entities would be registered on the alias thread. This would then be registered into EntityData by registering simple. After this, parsing would start on the alias thread, specifically the (simple) entity spectral arrow. While this was happening, the code for registering non-simple EntityDatas would run, which modified the EntityData iterator while parsing of spectral arrow (or sometimes arrow) was ongoing, causing the exception.

Solution
As the alias thread seems to only start parsing simple entities when it has completed, my solution is to avoid allowing modification of the iterator while looping. So far, this has not resulted in any problems.

Before, this error would occur on about 2/3rds of my test runs. This seems fixed now, though.


Target Minecraft Versions: 1.19.4
Requirements: none
Related Issues: none

@Efnilite Efnilite added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.10 Targeting a 2.10.X version release labels Dec 8, 2024
@sovdeeth sovdeeth merged commit bffa36b into SkriptLang:dev/feature Dec 15, 2024
5 checks passed
@Efnilite Efnilite deleted the fix-async-alias-loading branch December 15, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.10 Targeting a 2.10.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants