Factorio quits without warning

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
mrck2
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 16, 2021 2:48 pm
Contact:

Factorio quits without warning

Post by mrck2 »

On Mac you usually quit apps by using "Command + Q". I frequently (at least once a day) quit factorio by accident. Q is used very frequently within factorio (working with ghosts, abort, …). Command is also used frequently. Sometimes is happens that I press Command + Q by accident which will quit Factorio without any warning and without saving. This leads to data loss.

Usually on macOS, Apps are supposed to quit when using Command+Q without asking but ONLY in case there is not data loss. Typically apps automatically save before quitting or use some system APIs to restore unsaved things (state restoration, NSDocument, …).

Since my base is so huge I have set the auto save interval to 30 minutes - otherwise saving is too annoying because it takes ~5-10 sec. Earlier I have set autosave to 30 sec which was okay in terms of data loss.

I tried to change the shortcut for quitting factorio to something else but there is no setting for that.

I would love to see some form of auto save before quit or a warning dialog that shows up before quitting.

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Factorio quits without warning

Post by Loewchen »

You can change keybindings to what ever works better for you in the settings, if you want to make a feature request see viewforum.php?f=6.

Xorimuth
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Factorio quits without warning

Post by Xorimuth »

I use Mac as well, and I think I've done this at least once. A warning would be nice.

You should enable the hidden option "Non blocking saves" which means that autosaves don't interrupt your playing and you can autosave much more frequently.
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

mrck2
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 16, 2021 2:48 pm
Contact:

Re: Factorio quits without warning

Post by mrck2 »

@Loewchen: I am satisfied with all of the shortcuts. But there is no shortcut setting for quitting the game.

mrck2
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 16, 2021 2:48 pm
Contact:

Re: Factorio quits without warning

Post by mrck2 »

@Xorimuth: Thanks. Did not know this option/feature. I was googling for it and I found another post in this forum that mentioned that it can corrupt save files… Would like to avoid that. :)

Xorimuth
Filter Inserter
Filter Inserter
Posts: 624
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Factorio quits without warning

Post by Xorimuth »

mrck2 wrote:
Sat Jan 16, 2021 3:20 pm
@Xorimuth: Thanks. Did not know this option/feature. I was googling for it and I found another post in this forum that mentioned that it can corrupt save files… Would like to avoid that. :)
Well it is technically "experimental" and not quite fully supported. On the other hand, I think that people would report if it corrupted save files, and I've never had a problem.
My mods
Content: Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Remote Configuration | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Factorio quits without warning

Post by Deadlock989 »

mrck2 wrote:
Sat Jan 16, 2021 3:17 pm
@Loewchen: I am satisfied with all of the shortcuts. But there is no shortcut setting for quitting the game.
I know nothing about Macs except that they're overpriced, but the equivalent in Windows is Alt-F4. This is an OS feature, not a Factorio hotkey. You don't get a warning for it in Windows either. Applications like word processors can interrupt the exit if they have unsaved data, but this doesn't make any sense in the context of a game like Factorio because the game state is always changing. You would be forcing everyone to confirm a quit even if they intended to quit. I have an app that does this, sometimes it postpones shutting my PC down because I didn't notice the confirmation dialog in the background and I walk away and accidentally leave it running all night.
Image


mrck2
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 16, 2021 2:48 pm
Contact:

Re: Factorio quits without warning

Post by mrck2 »

Deadlock989 wrote:
Sat Jan 16, 2021 3:30 pm
mrck2 wrote:
Sat Jan 16, 2021 3:17 pm
@Loewchen: I am satisfied with all of the shortcuts. But there is no shortcut setting for quitting the game.
I know nothing about Macs except that they're overpriced, but the equivalent in Windows is Alt-F4. This is an OS feature, not a Factorio hotkey. You don't get a warning for it in Windows either. Applications like word processors can interrupt the exit if they have unsaved data, but this doesn't make any sense in the context of a game like Factorio because the game state is always changing. You would be forcing everyone to confirm a quit even if they intended to quit. I have an app that does this, sometimes it postpones shutting my PC down because I didn't notice the confirmation dialog in the background and I walk away and accidentally leave it running all night.
You wrote that you have an app that postpones shutting down your PC because you did not notice the confirmation dialog. For this case there is specifically a a system API for that which is called "Sudden Termination". You can either support it or not. Factorio is not supporting it. Here is a link to the API documentation: https://developer.apple.com/documentati ... ermination

Handling "command + q" is handled by each app. It is not an OS feature on macOS. Each app has to set that up individually. Here is the link to the corresponding system API: https://developer.apple.com/documentati ... inatereply.

I think your initial statement, that you know nothing about Macs (with one exception) is totally true.

I have been developing apps for macOS for over 10 years. All I was trying to do with this report is to give the developers a hint that their particular handling of "command + q" is not what a Mac user would expect. That being said I love Factorio and I still like macOS. If my issue is not addressed those two things won't change.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Factorio quits without warning

Post by Deadlock989 »

mrck2 wrote:
Sat Jan 16, 2021 5:13 pm
You wrote that you have an app that postpones shutting down your PC because you did not notice the confirmation dialog. For this case there is specifically a a system API for that which is called "Sudden Termination". You can either support it or not. Factorio is not supporting it. Here is a link to the API documentation: https://developer.apple.com/documentati ... ermination
There's a MacOS system API that will help Windows apps exit cleanly on a system shutdown? I really have learned something today.
Image

mrck2
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sat Jan 16, 2021 2:48 pm
Contact:

Re: Factorio quits without warning

Post by mrck2 »

Deadlock989 wrote:
Sat Jan 16, 2021 5:19 pm
mrck2 wrote:
Sat Jan 16, 2021 5:13 pm
You wrote that you have an app that postpones shutting down your PC because you did not notice the confirmation dialog. For this case there is specifically a a system API for that which is called "Sudden Termination". You can either support it or not. Factorio is not supporting it. Here is a link to the API documentation: https://developer.apple.com/documentati ... ermination
There's a MacOS system API that will help Windows apps exit cleanly on a system shutdown? I really have learned something today.
The binary that is shipped by Factorio is a native macOS executable. Not a windows app. Maybe this explains your confusion.

Code: Select all

$ file /Applications/factorio.app/Contents/MacOS/factorio
prints out "Mach-O 64-bit executable x86_64"

sorahn
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Tue Mar 17, 2020 11:35 pm
Contact:

Re: Factorio quits without warning

Post by sorahn »

Deadlock989 wrote:but the equivalent in Windows is Alt-F4. This is an OS feature, not a Factorio hotkey
Sure, but alt-f4 is not anywhere near any keys being used normally to play the game, where as 'Q' and Command are both pressed regularly for the default keybindings on MacOS. I had this problem myself a few times.

You can change the keybinding to quit factorio in MacOS itself.

System Preferences -> Keyboard -> Shortcuts -> App Shortcuts. Add a custom shortcut [+] for just factorio, add menu title for quit "Quit factorio", and set a new keybinding.

Image

Post Reply

Return to “Technical Help”