-
Bug
-
Resolution: Fixed
-
Minecraft 19w03b, Minecraft 19w13b, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.2 Pre-Release 4, 20w13b, 21w07a, 1.17.1, 1.18.1
-
None
-
Confirmed
-
Networking
-
Important
-
Platform
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...
- relates to
-
MC-135761 StackOverflowError when LAN world is closed
- Resolved