-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ArrayIndexOutOfBoundsException in NearestSortingList #2742
Comments
I changed the logging at the code location a bit. We should get a stacktrace when this hits again. |
Thanks! I just updated the event server to Omega 652, which includes that and some other stuff :-) Feel free to join up to try to crash sometime: http://jenkins.terasology.org/job/DistroOmega/652/artifact/distros/omega/build/distributions/TerasologyOmega.zip (I'll be sleeping soon but maybe more tomorrow) |
Is this what we're looking for? Happened while testing in single player with some, uh, creative railgun usage (drilling straight down to get to the underworld - my new PC can do this with no apparent slowdown holding down the right mouse button)
|
Deeper than expected and a good spot for digging :) Basic Idea of the class seems to be to clone the internal list before sorting (synchronized), then sort the list (unsynchronized) and then apply pending add/remove/clear operations to the list (synchronized). One guess by a short look: If two threads sort the list in parallel (can this happen at all?) and there are pending add/remove commands, will the first thread apply the commands and the second one replace the updated list with the old one? |
I had the same exception. I have looked into the class TLongHash and found an error which may cause the exception: In the super-constructor (TPrimitiveHash and THash) the method setUp(..) is called which is overridden in TLongHash to do some initialisation in class TLongHash. This is not allowed: If TLongHash-constructor calls super(), no fields of TLongHash are existing yet and so cannot be correctly initialised by the setUp(..)-call in the super-constructor. |
Did some deeper debugging and testing, probably found the isse - at least i can't reproduce it anymore with #2884 in place. Prior to the changes i got the exception every time after excessive railgun use. |
Maybe an issue in the sort logic or an issue in the add-remove logic of the list?
What actually happened
Random Multiplayer Testing with the gci content and NeoTTA with ~6 players.
How to reproduce
I have no idea :) It occured only once so far.
Log details
Only this one, all other lines were unrelated (chat events, destroyed entities, multiple chunks loaded)
19:58:01.762 [Timer-1] ERROR o.t.r.logic.NearestSortingList - Uncaught exception in sorting thread: java.lang.ArrayIndexOutOfBoundsException: 200
The text was updated successfully, but these errors were encountered: