failing rehash in IntOpenHashSet()

27 views
Skip to first unread message

Luc Hogie

unread,
Jan 2, 2018, 2:59:20 AM1/2/18
to fastutil
Hi,

I created a IntOpenHashSet to store positive integers then remove them all. I get this error while attempting to remove an element that is in:

java.lang.ArrayIndexOutOfBoundsException: -1
    at it.unimi.dsi.fastutil.ints.IntOpenHashSet.rehash(IntOpenHashSet.java:693)
    at it.unimi.dsi.fastutil.ints.IntOpenHashSet.removeEntry(IntOpenHashSet.java:398)
    at it.unimi.dsi.fastutil.ints.IntOpenHashSet.remove(IntOpenHashSet.java:428)

When the failure occurs, the set contains 50705 elements, and I'm trying to remove element 132615.

Sebastiano Vigna

unread,
Jan 2, 2018, 4:45:22 AM1/2/18
to fast...@googlegroups.com
Are you sure you are not accessing the collection concurrently? Can you create a unit test?
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply all
Reply to author
Forward
0 new messages