mojira.dev
MC-72943

Game freeze after closing an "Open to LAN" single player world

The bug

When the host of a singleplayer world which was opened to LAN tries to close the world their game (client) may freeze.

The log shows that the server was successfully stopped though.

[17:42:54] [Server thread/INFO]: BartZeroSix left the game
[17:42:54] [Server thread/INFO]: Stopping singleplayer server as player logged out
[17:42:54] [Server thread/INFO]: Stopping server
[17:42:54] [Server thread/INFO]: Saving players
[17:42:54] [Server thread/INFO]: Saving worlds
[17:42:54] [Server thread/INFO]: Saving chunks for level 'Freebuild 1.8'/Overworld
[17:42:54] [Server thread/INFO]: Saving chunks for level 'Freebuild 1.8'/Nether
[17:42:54] [Server thread/INFO]: Saving chunks for level 'Freebuild 1.8'/The End

How to reproduce

  1. Open a world

  2. Open it to LAN

  3. Try to close the world

Note: Since this bug seems to be caused by a race condition it could be possible that you cannot reproduce this bug with some computers.

Code analysis and debugging results

JStack, WhatIsHang, and debug logs related to this issue

This bug seems to have the same cause like MC-92255, which is caused by the method IntegratedServer.initiateShutdown being called twice.

Linked issues

MC-65329 LAN - Game freezes on hosting player after save & quit. Resolved MC-66533 Saving game bug Resolved MC-66646 When singleplayer world is open to LAN, pressing "Save and Quit to Title" crashes game without crash report. Resolved MC-66657 Lan +Logout Resolved MC-67130 Game Freeze Resolved

Attachments

Comments 93

How long did you wait after 17:42:54 ?

I have waited more than 15 min the first time. After that only 5 minuts or so, but this time only 30 secondes just to have launcher's log.
It probably doesn't come from my PC (i mean not from RAM or something like that), because i have a pretty good PC (not a single problem even on huge modpack).

Is there a crash report generated in .minecraft/crash-reports?

It does not look like. The folder isn't even there. (I cleaned my .minecraft folder for the 1.8 release though.)

I can confirm this.
Here is a link MC-73057 to the bug report I submitted (marked duplicate .. sorry didn't think it was reported) anyways there is more info in my report that might help reproduce this bug.

To me it appears maybe the network stream is not being closed every time.

P.S. I have personally left the client open for hours after it hangs and it never goes back to main menu.

83 more comments

Can definitely confirm that the issue has returned. It was not present in 18w19b (dhm.q), but is definitely present in 18w20a (dhq.q) (and 18w20c (dhr.q)).

Why the status of the issue is resolved? It remains in almost every update. Cannot say it is critical though. While the game I play with my wife, crashes almost every time, it does not corrupt save data as it seems. But it became VERY annoying when we started playing with big modpacks like Sevtech, as changing the world is a pain, because loading the game again takes 5 minutes on my high end PC, and 15 minutes on my wife's laptop.

It's been fixed in 1.13. If you're using modpacks, you're almost certainly running an older (and now unsupported, though mods haven't been released for newer versions yet) version, where this has not yet been fixed.

Happened to me on a ModPack , Version 1.10.2 , LAN with my brother , Waited 20 minutes , Still Happening , Can't access my old world though , Anyone found a solution ?

We do not support modded versions of the game, nor do we support modified launchers, nor do we support outdated versions of the game.

This bug is fixed by updating to a current version of the game; at least 1.13.

Bart Mons

coschevi

Confirmed

closing, freezing, lan, singleplayer

Minecraft 1.8, Minecraft 1.8.1-pre1, Minecraft 1.8.1-pre2, Minecraft 1.8.1-pre4, Minecraft 1.8.1, ..., Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w20a, Minecraft 1.13-pre1, Minecraft 1.13-pre3

Minecraft 18w01a, Minecraft 1.13-pre6

Retrieved