Krypton icon indicating copy to clipboard operation
Krypton copied to clipboard

Players changing view distance breaks SortedArraySet removeIf

Open BomBardyGamer opened this issue 4 years ago • 1 comments

Description

With the new chunk loading system, attempting to re-propagate a player with a different view distance can sometimes result in NullPointerExceptions from removeIf.

Do note, however, that this is not as simple as just properly null checking, as that will result in strange behaviour.

Steps to reproduce

Note: currently not reproducible, as per-player view distances are currently disabled due to this issue.

  1. Join the server with a set view distance
  2. Decrease the view distance
  3. Get kicked for internal exception

Expected behaviour

The removeIf operation removes all values matching the predicate, appropriately dealing with null values when they arise.

Details

  • Server version: Krypton 0.33
  • Java version: 16

Other information

N/A

BomBardyGamer avatar Aug 10 '21 13:08 BomBardyGamer

This will get fixed when I drop the very broken ticket-based chunk propagation system.

BomBardyGamer avatar Apr 20 '22 10:04 BomBardyGamer