Error Executing Task on client causing freeze/crash when respawning after /kill
LucilleTea opened this issue ยท 3 comments
Reproduction Steps
- Be an OP in spectator mode on a dedicated server
- Fly away from spawn
- /kill then respawn
- Repeat 2 and 3 until the game freezes
Crash Report File
Log which contains the error, from an earlier sodium 0.1.1 snapshot.
Log which does not contain the specific error, but still froze in the same way from these reproduction steps, from the latest sodium commit.
Additional Information
Not sure whether that error only showing up sometimes is a version difference, down to randomness, or etc. It looks to me like the relevant code in sodium hasn't been changed between these versions.
Confirmed the freeze happens with only sodium loaded (latest build), and does not happen with sodium removed.
Unfortunately the error continues to not show in the log, even though the freeze happens in the same situation.
The freeze seemed to always happen on the third /kill in my targeted reproduction. Using a server view distance of 16.
This also occurs in singleplayer, I managed to reproduce it at 3 view distance. The problem seems to be that every time a player does /kill, the HashTable of loaded chunks has more chunks added to it for some reason (visible in the SodiumChunkCache debug string). As you do more and more /kills the number of loaded chunks will steadily increase (if enough chunks aren't unloaded) until loadChunkFromPacket
will attempt to exceed the capacity of the loaded chunk FixedLongHashTable. At least that's what I found. I'm not entirely sure as to why these chunks are added.
Logfile:
debug-1.log
As of 6caf15f SodiumChunkManager and the problematic hash table have been removed, so this issue should be resolved.