[2.0.21] Game closes "Quitting: window closed." when machine is placed during saving

Things that we don't consider worth fixing at this moment.
Daniel_I_Am
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Nov 23, 2024 11:21 pm
Contact:

[2.0.21] Game closes "Quitting: window closed." when machine is placed during saving

Post by Daniel_I_Am »

The game crashes if a modification is made to the world (by placing a machine for instance) while the saving progress bar dialogue is visible.

What did you do?
I was able to reproduce this pretty consistently with some effort. It seems to be independent of a specific save.

I created a new save, ran `/cheat` to give me a set of legendary Mech Armor with a bunch of legendary Exoskeletons to move as fast as I could. Then I just placed a bunch of machines (or even ghosts) while moving. I set the autosave interval to 1 minute to speed up reproduction. See attached reproduction video for a visual version of this explanation.

Wait for the autosave timer to tick down to zero while placing ghosts and the game crashes.

What happened?
The game crashes.

What did you expect to happen instead? It might be obvious to you, but do it anyway!
The game not to crash and process the request to a place a machine after the saving is done.

Does it happen always, once, or sometimes?
In normal play, it happens sometimes, varying between once an hour or not at all during an entire play session.
When attempting to reproduce, I can get it to happen about half the time.

Environmental details
Game version: 2.0.21 (I noticed this on 2.0.20 current stable, but switched to latest experimental to verify it was still happening there)
OS: Linux (Arch)
Also of note: The save is written to an HDD, which will likely cause longer saving times.

Unfortunately, I see nothing in the log files explaining the crash. Full log files of two crashes attached.
95.368 Info AppManager.cpp:310: Saving to _autosave3 (blocking).
96.368 Info GlobalContext.cpp:1965: Waiting for save to finish.
96.518 Quitting: window closed.
96.518 Info GlobalContext.cpp:760: Deleting active scenario.
96.894 Steam API shutdown.
96.896 Goodbye
Attachments
factorio-crash-reproduction.mp4
(22.24 MiB) Downloaded 18 times
factorio-previous.log
(10.04 KiB) Downloaded 14 times
factorio-current.log
(7.75 KiB) Downloaded 16 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 14890
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.21] Game closes "Quitting: window closed." when machine is placed during saving

Post by Rseding91 »

This sounds like the linux operating system issue where it has a limited size buffer for input/window events and if the process doesn't consume them because it's doing something else intensive they fill and the operating system force closes the program.

This thing https://www.reddit.com/r/kde/comments/1 ... increases/

Which is outside of our control however terrible of a user experience it is.
If you want to get ahold of me I'm almost always on Discord.
Daniel_I_Am
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Nov 23, 2024 11:21 pm
Contact:

Re: [2.0.21] Game closes "Quitting: window closed." when machine is placed during saving

Post by Daniel_I_Am »

I see, it is reproducible by just performing inputs during the save in general. I just happened to have only noticed it during attempts to place a machine in the world.

So this is a problem in Wayland, not Factorio. Especially seeing how saves tend to take longer now that there are multiple surfaces/planets involved in the game.

Not an ideal user experience indeed. At least it still successfully creates the save, so after restarting you can jump in immediately.

I have for now switched the preferred rendering engine back to X11 instead of Wayland (which is unfortunate, since the game does look better on Wayland), in case through XWayland the buffer is handled properly during saves.
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 669
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [2.0.21] Game closes "Quitting: window closed." when machine is placed during saving

Post by raiguard »

What clients are "supposed" to do is reconnect to the compositor after they were disconnected, but in practice, nobody does this.

In any case, this would be up to SDL to solve, since we don't interface with Wayland directly.
Don't forget, you're here forever.
Post Reply

Return to “Won't fix.”