tr7zw/EntityCulling

ArrayIndexOutOfBoundsException

Closed this issue · 3 comments

After some hours playing with EC some entities tend to get invisible, not sure if this exception causes this (it happens usually a long time, a few hours, before I actually realized entities turn invisible).

[21:38:34] [CullThread/INFO]: [STDERR]: java.lang.ArrayIndexOutOfBoundsException: Index 1121 out of bounds for length 1025
[21:38:34] [CullThread/INFO]: [STDERR]: 	at it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap$MapIterator.nextEntry(Int2ObjectLinkedOpenHashMap.java:1183)
[21:38:34] [CullThread/INFO]: [STDERR]: 	at it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap$ValueIterator.next(Int2ObjectLinkedOpenHashMap.java:1689)
[21:38:34] [CullThread/INFO]: [STDERR]: 	at com.google.common.collect.Iterators$1.next(Iterators.java:146)
[21:38:34] [CullThread/INFO]: [STDERR]: 	at dev.tr7zw.entityculling.CullTask.cullEntities(CullTask.java:89)
[21:38:34] [CullThread/INFO]: [STDERR]: 	at dev.tr7zw.entityculling.CullTask.run(CullTask.java:70)
[21:38:34] [CullThread/INFO]: [STDERR]: 	at java.base/java.lang.Thread.run(Thread.java:1583)

Attached a list of my mods for potential side affects:

Screenshot

I did notice that the culling thread seems to get stuck sometimes too. Not yet sure if its the ArrayIndexOutOfBoundsException(it shouldn't be, but maybe it has something to do with it?) It's a bit tricky to figure out as its not easy to reproduce.

Ok can confirm that it's not caused by this. I assume some iterator gets bugged from the async and gets stuck for some time. Currently playing the game with a debugger attached so I can check it next time I see it.

alright, thanks for your help :)