Factorio quits without warning
Factorio quits without warning
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.
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.
Re: Factorio quits without warning
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.
Re: Factorio quits without warning
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.
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: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: Factorio quits without warning
@Loewchen: I am satisfied with all of the shortcuts. But there is no shortcut setting for quitting the game.
Re: Factorio quits without warning
@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.
Re: Factorio quits without warning
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: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Factorio quits without warning
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.
Re: Factorio quits without warning
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 ... erminationDeadlock989 wrote: ↑Sat Jan 16, 2021 3:30 pmI 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.
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.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: Factorio quits without warning
There's a MacOS system API that will help Windows apps exit cleanly on a system shutdown? I really have learned something today.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
Re: Factorio quits without warning
The binary that is shipped by Factorio is a native macOS executable. Not a windows app. Maybe this explains your confusion.Deadlock989 wrote: ↑Sat Jan 16, 2021 5:19 pmThere's a MacOS system API that will help Windows apps exit cleanly on a system shutdown? I really have learned something today.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
Code: Select all
$ file /Applications/factorio.app/Contents/MacOS/factorio
Re: Factorio quits without warning
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.Deadlock989 wrote:but the equivalent in Windows is Alt-F4. This is an OS feature, not a Factorio hotkey
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.