Open digidoor opened 8 months ago
Nice catch! And thanks for the detailed repro instructions. I think the crux of the bug is that starting from an empty preset and then using the "import" feature still allows you to add a milestone without selecting a checkbox, as if the list was still empty. That puts the settings screen in a corrupted state.
Reproduction:
Bam, crashes. Steps 11 and 12 can be skipped and the same crash will occur.
The problem is at step 10: after importing, the Add Group/Item/Research/etc. buttons are clickable even though no checkbox is selected and the Milestone list is not empty. When any of the Add buttons are clicked, they make a ghost milestone that isn't attached to anything, and then clicking its checkbox (or the little down arrow to change its position in the list) leads to a crash. Presumably this is possible to allow something to be added to an empty Milestones list.
Another way to trigger it (same steps 1-5):
The final and simplest way to trigger the crash is to import something to the Empty list. The Add buttons will still be active and then steps 10 & 13 can be repeated for a crash. The trigger is simply to do a successful import when the Empty list is selected and then try to Add something. The resulting item cannot be selected or moved without a crash.
I ran into the bug because I was hoping to make my own list to use on any playthrough, but I don't think mods can write or read to/from external files. If I make my own list and rezip the mod to enable it, would I be able to change the list later on an existing save without causing a crash, do you think?