[Rseding91] [1.0.0] mod crash not recoverable

This subforum contains all the issues which we already resolved.
-DeadlyKitten
Inserter
Inserter
Posts: 42
Joined: Sat Dec 14, 2019 3:26 am
Contact:

[Rseding91] [1.0.0] mod crash not recoverable

Post by -DeadlyKitten »

If a mod crashes on startup currently the only option is to disable that mod or disable all mods. If the crash only happens sometimes based on start up settings then you get locked out of that mod, you cannot enable the mod because of the crash and you cannot change the settings and stop the crash because you cannot get past the startup prosses to the settings menu. the end result is that is if you enter the wrong settings you get softlocked out of the mod unless you delete ALL your mod settings

minimal example:
a mod with a startup setting: crash-game

in data.lua
if crash-game == true
a = 1 + nil -- I think this crashes but not 100% sure
end

real examples:
Randtorio (https://mods.factorio.com/mod/randotorio) will crash on some seeds but not others
Custom Terrain Generation (https://mods.factorio.com/mod/ctg) allows lua code as input, invalid code will break it
Inproper error catching for some string settings with format other then what the mod expects

posable fix?
add an option for 'change settings' or 'open without gameplay option' or something like that. It would allow you to open the game with the Continue, single player, and multiplayer buttons grayed out so you could change settings even with invalid prototypes
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [1.0.0] mod crash not recoverable

Post by eradicator »

This is imho the age old problem of not having a "reset settings for listed mods" option. The usual counter-argument is that mods can crash due to not-their-own settings too, but imho most of the time they crash on their own settings. And changing not-their-own settings is already possible with "disable listed mods" anyway.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
-DeadlyKitten
Inserter
Inserter
Posts: 42
Joined: Sat Dec 14, 2019 3:26 am
Contact:

Re: [Rseding91] [1.0.0] mod crash not recoverable

Post by -DeadlyKitten »

having a reset settings for listed mods option would work for this but would not be as nice as the previous mentioned plan, it would allow mod makers to use ctrl+shift+e to look at exactly what the prototypes ended up as, it would remove the softlock though which would be better then what we have now.

changing not-their-own settings is currently possible but is a giant hassle requiring 3-4 resets per try
1) disable crashed mod
1a) enable setting mod if needed
2) change startup setting in setting mod
3) enable crashed mod to check fix (if crash go to step 1)
Rseding91
Factorio Staff
Factorio Staff
Posts: 14250
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [1.0.0] mod crash not recoverable

Post by Rseding91 »

Ok, I added support to reset the mod settings for any of the mods that show in the error GUI. Outside of that; you can also just delete the mod-settings.dat file from the mods folder to force reset everything if you somehow managed to get into a setting-from-a-causes-b-to-error.
If you want to get ahold of me I'm almost always on Discord.
-DeadlyKitten
Inserter
Inserter
Posts: 42
Joined: Sat Dec 14, 2019 3:26 am
Contact:

Re: [Rseding91] [1.0.0] mod crash not recoverable

Post by -DeadlyKitten »

Thanks for the fix
Post Reply

Return to “Resolved Problems and Bugs”