I've been dedicating a lot of time recently to building a 1.12.2 pack (on recommended version 14.23.5.2847), and just recently, I discovered that players can't play in LAN worlds for more than few minutes without being disconnected. I've looked through the logs, there are no suspected mods, and vanilla LANs work just fine, so I'm honestly clueless as to how to even go about fixing this problem. The host computer for LAN worlds runs completely fine. Minimal lag, no crashes. Players connecting to the LAN, however, are forcibly disconnected, which sometimes results in a crash on their side. Sometimes, they're disconnected immediately. Sometimes they're disconnected before a "____ has joined the world" message is even sent in chat. Sometimes, they're able to walk around a bit before they're kicked.
Here's an excerpt from a log, highlighting what happens when a player is disconnected:
The first line of the error messages reads
[20:30:44] [Netty Server IO #10/ERROR]: NetworkDispatcher exception io.netty.util.IllegalReferenceCountException: refCnt: 0
When a player is disconnected, on their side, they either get a simple "Disconnected" message, or a much more detailed error that reads "IOException: An existing connection was forcibly closed by the remote host."
I'm really desperate to find a fix for this problem, because I want to ensure that LANs work on my pack. That's a huge part of the multiplayer component to a pack, and I feel that there's not much point in developing it further if LAN worlds are broken. At the same time...I've dumped nearly 100 hours into building this thing! ?