Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server exiting to main menu hangs client #7462

Open
SamuXarick opened this issue Apr 2, 2019 · 4 comments
Open

Server exiting to main menu hangs client #7462

SamuXarick opened this issue Apr 2, 2019 · 4 comments

Comments

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Apr 2, 2019

Version of OpenTTD

1.9.0

Expected result

Client exits to main menu

Actual result

Client hangs

Steps to reproduce

(Server) Create a non-dedicated server
(Client) Join server
(Server) Exit to main menu
(Client) hangs

@SamuXarick
Copy link
Contributor Author

@SamuXarick SamuXarick commented Apr 2, 2019

EDIT: Oh snap, client actually reached main menu as I was typing this. It really took a long time though, and looked like it was hanged.

@SamuXarick
Copy link
Contributor Author

@SamuXarick SamuXarick commented Apr 3, 2019

It was due to my savegame format, lzma:9 and map size being 4096x4096. It could display a Zzz cursor though.

@LordAro
Copy link
Member

@LordAro LordAro commented Dec 31, 2019

I can confirm this. More so, it would appear that the emergency network save (netsave.sav) happens twice, compounding the issue. (FOO debugs show where ClientNetworkEmergencySave is called from)

FOO: virtual NetworkRecvStatus ClientNetworkGameSocketHandler::Receive_SERVER_SHUTDOWN(Packet*)
dbg: [net] Client: Performing emergency save (netsave.sav)
FOO: void ClientNetworkGameSocketHandler::ClientError(NetworkRecvStatus)
dbg: [net] Client: Performing emergency save (netsave.sav)

Not yet sure why the whole game hangs when it's doing this emergency save - looks like it might just be because it's not threaded?

@LordAro
Copy link
Member

@LordAro LordAro commented Jan 2, 2020

Seems like it might not be possible to thread the save in this case - as nonthreaded would mean that the game goes back to the title screen and loads the title game, which would corrupt the save/saving process. Probably.

Caused by #6796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.