[Rseding91] [1.1.72][headless] Saving failure+crash when save is a folder instead of a zip

Post Reply
kwaio
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Nov 30, 2022 9:43 pm
Contact:

[Rseding91] [1.1.72][headless] Saving failure+crash when save is a folder instead of a zip

Post by kwaio »

Hi.

Started toying with the headless server recently.
I imported a game from my computer to the server and unzipped the save into /opt/factorio/saves/<savename>

Starting the headless server worked without any issue, I was able to connect, play, autosaves worked like a charm.
But when disconnectiong, as expected, server pauses and attempt to save the game and then :

Code: Select all

4802.881 Info ServerMultiplayerManager.cpp:1058: Disconnect notification for peer (1)
4802.881 Info ServerMultiplayerManager.cpp:944: updateTick(2122353) received stateChanged peerID(1) oldState(InGame) newState(DisconnectScheduled)
2022-11-30 21:35:06 [LEAVE] kwaio2 left the game
4802.882 Info ServerSynchronizer.cpp:623: nextHeartbeatSequenceNumber(288074) removing peer(1).
4803.881 Info ServerMultiplayerManager.cpp:1205: Auto saving map as /opt/factorio/saves/NONONONONO
4803.898 Info AppManager.cpp:420: Saving game as /opt/factorio/saves/NONONONONO
4803.900 Error ParallelScenarioSaver.cpp:118: Saving scenario failed: There are multiple packages for package NONONONONO in directory /opt/factorio/saves (NONONONONO.zip, NONONONONO)
4803.915 Error Util.cpp:83: Attempting to create notice box in headless mode. Message: 'Cannot save map: There are multiple packages for package NONONONONO in directory /opt/factorio/saves (NONONONONO.zip, NONONONONO)'
4803.994 Info ServerMultiplayerManager.cpp:114: Disconnecting multiplayer connection.
4803.994 Info ServerMultiplayerManager.cpp:795: updateTick(4294967295) changing state from(InGame) to(DisconnectingScheduled)
4804.015 Info ServerMultiplayerManager.cpp:141: Quitting multiplayer connection.
4804.015 Info ServerMultiplayerManager.cpp:795: updateTick(4294967295) changing state from(DisconnectingScheduled) to(Closed)
4804.160 Info UDPSocket.cpp:218: Closing socket
4804.160 Info UDPSocket.cpp:248: Socket closed
4804.161 Goodbye
So it seems reading & importing a save as a folder works, but then it prevents the server from correctly saving.
Replacing the folder by a zip archive of itself works as expected though.

In my opinion, the server should either refuse toi start with anything other than a zip or be able to handle the folder it opened when saving.

PS : thanks to the autosave, nothing of value was lost.

Thanks for the amazing game btw. (And the otherwise flawless, lightweight and very easy to install dedicated server, this is so rare these days)

Post Reply

Return to “Assigned”