Moulberry / NotEnoughUpdates

http://moulberry.github.io/projects
GNU Lesser General Public License v3.0
469 stars 58 forks source link

You have a multithreading issue #181

Open Floweynt opened 3 years ago

Floweynt commented 3 years ago

Not sure if this is patched in later versions, and not sure if this is reproducible:

java.util.ConcurrentModificationException
    at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1207)
    at java.util.TreeMap$ValueIterator.next(TreeMap.java:1252)
    at io.github.moulberry.notenoughupdates.NEUEventListener.onTick(NEUEventListener.java:169)

Looking at this the problem seems to be from

neu.manager.getItemInformation().values()

TreeMap is not thread-safe