ConcurrentModificationException in EventUtils.GetMatchingEvents
LadyCailinBot opened this issue ยท 1 comments
CMDHELPER-2862 - Reported by CyaNox
[03:21:33 WARN]: Exception in thread "CommandHelperPlayerMoveEventRunner"
[03:21:33 WARN]: java.util.ConcurrentModificationException
[03:21:33 WARN]: at java.util.TreeMap$PrivateEntryIterator.nextEntry(TreeMap.java:1115)
[03:21:33 WARN]: at java.util.TreeMap$KeyIterator.next(TreeMap.java:1169)
[03:21:33 WARN]: at com.laytonsmith.core.events.EventUtils.GetMatchingEvents(EventUtils.java:178)
[03:21:33 WARN]: at com.laytonsmith.core.events.drivers.PlayerEvents$player_move$1.run(PlayerEvents.java:1582)
[03:21:33 WARN]: at java.lang.Thread.run(Thread.java:724)
I'm not certain what exactly causes this and its fairly hard to reproduce but it'll disable any player_move binds until a /reloadalias.
We don't have many bind to the player_move event mostly just one for a teleport system that looks roughly like:
bind(player_move, null, null, @e,
g(
if (@e['to']['y'] > 255 || @e['to']['y'] < 0, die()),
@hash = @e['to']['world'] . floor(@e['to']['x']) . '.' . floor(@e['to']['y']) . '.' . floor(@e['to']['z']),
@p = import('portal.portals'),
if (array_index_exists(@p, @hash)){
_portal_initiate_trasport(@e, @p[@hash])
}
)
)
and a temporary bind like this:
bind(player_move, array('priority': 'highest', 'id': 'teleport.checkidle.move.'.@playerlc), array('player': @player), @e,
tmsg(@e['player'], colorize(' &cTeleportation canceled. You did not stay idle.'))
_teleport_cancel_checkidle(@e['player'])
)
I'm not sure if any of this code is relevant though to the stacktrace as it seems to not refer to any of the binds executions.