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

Use thread-safe queue for tooltips #1005

Open
Swedz opened this issue Jan 15, 2025 · 1 comment
Open

Use thread-safe queue for tooltips #1005

Swedz opened this issue Jan 15, 2025 · 1 comment

Comments

@Swedz
Copy link
Collaborator

Swedz commented Jan 15, 2025

I only have proof it has happened with my similar tooltip system, but MI uses a PriorityQueue to store the tooltips for items (see here) and EMI will try to load tooltips asynchronously over multiple threads which can cause a ConcurrentModificationException in MITooltips.attachTooltip (here). Here is the issue i opened on my mod doing a similar thing if you want to see the stacktrace. Not sure if this is just a me thing, since I've only ever seen this happen once and it was with my mod but thought I should give you a heads up.

@Technici4n
Copy link
Contributor

I wonder how applicable this is to how MI currently operates. If all the tooltip attachments get registered in the same class, the registration is protected by the class initialization lock.

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

No branches or pull requests

2 participants