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

StackOverflowError when using /stop with player logged in

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 19w03b, Minecraft 19w13b, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.2 Pre-Release 4, 20w13b
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Crash

      Description

      When using /stop (or the server crashes) with a player logged in, there is a high chance that a stack overflow error occurs.

       

      This is because a move (or other packet) attempts to get queued from the network thread for processing by the server thread.

       The network thread then checks if it is the main thread.  It is not, so it queues it for processing.

      The task handler then checks if it is not the main thread. The issue lies in that these checks are not symmetrical. The not main thread check also checks if a /stop has been issued. If it has, then it attempts to execute the queued task immediately.  This causes the code to jump back to *** and eventually stack overflow.

       Unfortunately I don't have a clean stack trace, but the logic checks out...

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            md_5 [Mod] md_5
            Votes:
            9 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: