Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-118164

NaN player velocities set while sneaking causes hang/crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • Minecraft 1.11.2, Minecraft 1.12 Pre-Release 6
    • None
    • Very basic linux server, 1 diagnostic plugin to set the players velocity to reproduce the NMS issue.
    • Unconfirmed

      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)

            Unassigned Unassigned
            joannou1 Johnny
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: