Jump to content

Race condition within ListenerList resize behavior


WireSegal

Recommended Posts

https://gist.github.com/yrsegal/4f9ca65d13b74dbf69dea24e6a9d548a

 

This occurs approximately 3 times out of 4 loads of the game. By stepping through with breakpoints, it appears that the resize behavior for ListenerList, meant to keep it consistent across all listener lists, was not resizing the last 14 or so out of about 50 listeners. This leads to a crash (ArrayIndexOutOfBoundsException), as seen above.

 

I have confirmed, by putting locks into the code, that this does not occur if the setup threads are not concurrent.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.