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 ArrayIndexOutOfBoundsException in CommentPanel. #11786

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

asvitkine
Copy link
Contributor

Change Summary & Additional Notes

This a follow-up to my change that narrowed the scope of the lock in this code. We're now seeing node.getLastChild() throw an index out of bounds, even though it's directly after a size check. This is likely due to a race.

Instead of reading the children off the actual history tree, this changes the code to instead get this info directly from the event, which is more correct as well. It should fix the issue.

Should fix: #11785

Release Note

This a follow-up to my change that narrowed the scope of the lock in this code. We're now seeing node.getLastChild() throw an index out of bounds, even though it's directly after a size check. This is likely due to a race.

Instead of reading the children off the actual history tree, this changes the code to instead get this info directly from the event, which is more correct as well. It should fix the issue.
@asvitkine asvitkine merged commit 469ad90 into triplea-game:master Jul 17, 2023
1 check 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.

CommentPanel#lambda$readHistoryTreeEvent$2:140 - java.lang.ArrayIndexOutOfBoundsException
1 participant