vigna / fastutil

fastutil extends the Java™ Collections Framework by providing type-specific maps, sets, lists and queues.
Apache License 2.0
1.81k stars 199 forks source link

ArrayIndexOutOfBoundsException #246

Closed File14 closed 3 years ago

File14 commented 3 years ago

Hello,

We get an ArrayOutOfBoundsException when we try to add an object to the Object2IntOpenHashMap. We are currently using FastUtil 8.5.2. Do you know what causes the exception to be thrown?

Error:

The following code is executed from the Geyser project that throws the exception: CACHED_BLOCK_ENTITIES.put(new Position(position.getX(), position.getY(), position.getZ()), blockState);

vigna commented 3 years ago

Most likely concurrent access. Try to synchronize the map.

File14 commented 3 years ago

It was the issue. Thank you very much for the fast support!