First, I'm using third party server software to reproduce this issue (Spigot).
But before you close this issue, the issue occurs in NMS code.
I'm merely using Spigot so I can more easily reproduce the issue on demand.
The server will hang and ultimately crash when a NaN velocity is applied to a player while they are sneaking.
It only occurs when the velocity is set while sneaking.
I know this may be an edge case issue, but it could possibly happen naturally in a vanilla server depending on the circumstances.
Here's what the Main thread is doing during the hang:
(1.11.2) https://hastebin.com/jagizuhequ.md
(1.12-pre6) https://hastebin.com/maporoduci.md
I'm guessing it's interpreting NaN as infinity and loading an infinite amount of chunks?
I've 'fixed' this in Spigot by setting a NaN velocity to 0, but they don't want to fix the issue there at the moment for possible compatibility/conflict reasons.
So I've decided to post this issue here, as the NMS shouldn't be interpreting NaN as infinity and loading an infinite amount of chunks. (or whatever the root cause of the hang may be)
Comments 5
Thanks, I just did try it in 1.12 pre6, it does still seem to occur.
This issue was just marked as resolved however, was it fixed?
Ah gotchya, I've updated the description to include the main thread dump for the 1.12-pre6 version as well, it varies slightly.
My fast, non-official verdict: this is a valid issue even though it's most obviously exposed through spigot. Though, I'd appreciate it if you could check the 1.12 prereleases, as there has been some changes in this area that may influence the issue (pre6 is available).
Also: for my own reference, SPIGOT-3283.