Page 1 of 1

[1.1.57] [LogisticsTrainNetwork] Existing save loads fine, but new saves are corrupted [solved]

Posted: Mon Apr 18, 2022 11:46 am
by some-enigma
So I have a save that I started many years ago, with about 250 hours in it, and it does have some mods. I haven't played it in a year, but fired it up this morning. The save loaded fine, and I could play fine and didn't note anything unusual, so saved and quit. I decided to check something just now, and tried to load the new save, and it fails with "NaN value loaded from input file. File could be corrupted." I've since tried creating new maps with the same mod list, and those new saves seem fine (albeit with very few entities as it's an empty map), but if I load up my existing save, any new saves I make from it give the same "NaN value loaded from input file" error. Luckily I still have my old save from a year ago as I didn't overwrite it this morning.

I've enabled 'log-stack-trace-on-non-critical-exception=true' and uploaded a factorio-current.log from trying to load the corrupt save. It seems to refer to TrainStop.cpp and Color.cpp, so I figured it might relate to either Automatic Train Painter, or Logistics Train Network. After some testing, it seems that disabling Logistics Train Network, loading the old save (without syncing mods), and creating a new save without LTN works fine. However, this obviously breaks my whole factory.

Even worse, if I take this save that works, and re-enable LTN, the new saves are corrupted once more with the same error (despite having no LTN entities).

Is it possible to rescue my save? Given the specific nature of the error (a stack trace on reading a save file) this felt more like a Factorio bug than an LTN bug.

I'm attaching the old save file that loads fine (1.1.zip), a save I made from that save that appears corrupted (1.16.7.zip) and my mod-list.json. I can upload my whole mods folder if it's useful, but it's almost 1GB in size.

Re: [1.1.57] [LogisticsTrainNetwork] Existing save loads fine, but new saves are corrupted

Posted: Fri May 13, 2022 8:59 am
by some-enigma
As of 1.1.59 this morning, it seems I can once again save and load from the new saves.