Page 1 of 1
Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Mon Nov 04, 2019 10:49 pm
by DrJones
In my heavily modded save (AngelBob + DeepCore + LTN + misc), sometimes when I deconstruct an LTN stop with bots, I get the following error, repeating forever:
"[LTN] Error: Invalid stop unit_number <number> in global.LogisticTrainStops."
The number seems to be the id of the deconstructed stop, perhaps.
It seems to happen deterministically with my current save. There are a bunch of bots on their way to deconstruct a bunch of stuff, including four LTN stops north-east of the player position. It seems to happen when the south-eastern of the four stops gets deconstructed.
I'm attaching current.log as per instructions.
Attaching the save doesn't seem to work. Perhaps 17Mb is too large to attach?
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Mon Nov 04, 2019 10:53 pm
by DrJones
Sent a download link for the save as DM.
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Tue Nov 05, 2019 7:34 am
by Optera
Working as intended.
There's a lot of ways entities can become invalid without raising events so when LTN notices an invalid stop in its cache it prints this error message and gracefully skips to the next stop.
That's how it will remain unless Factorio provides events whenever an entity becomes invalid, which I highly doubt as that would severely increase base game event overhead.
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Tue Nov 05, 2019 8:09 am
by DrJones
Is there something I can do to avoid getting into this state?
- Never deconstructing LTN stops with bots seems not-so-fun.
- 'Don't use LTN' is probably not your preferred solution.
- Save before every time I deconstruct a station, but that seems somewhat unwieldy.
If I can't avoid getting into this state, is there some way I can get out of this state when it happens? The message keeps beeping at me every second or so, and kept at it for the ~minute that I waited to see if it would go away on its own.
Optera, what's your suggested approach here?
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Tue Nov 05, 2019 6:00 pm
by jeckelbros
Similar issue here, except I seem to be able to get it to happen with bots, nanobots, or manually, but not every time I deconstruct the stop, only 1:4ish. I've just started designing stops for this map, so I've taken to saving before every stop is moved or deconstructed during design. I'm playing with a decentish number of mods.
dropbox with save, log and screenshot sent via DM
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Tue Nov 05, 2019 9:48 pm
by Optera
Sorry for the inconvenience.
I forgot to actually remove invalid stop indexes after finding one.
Should be fixed in next release.
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Tue Nov 05, 2019 9:54 pm
by jeckelbros
Thanks a ton. Cheers
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Wed Nov 06, 2019 12:32 am
by DrJones
Thanks for the fix, Optera! Much appreciated!
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Wed Nov 06, 2019 3:39 pm
by jeckelbros
Unfortunateluy, I still pull an error about 1:4 times mining a stop manually. Didn't try bots as it worked by hand repeatedly. Same game saves I sent you yesterday. Just updated ltn and tried it. It continues until I reload a previous save. PM if you need more. Thanks
https://imgur.com/a/wbRlSv1
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Wed Nov 06, 2019 5:49 pm
by Boogieman14
I just ran into this issue as well while running LTN 1.11.5. Not sure if it's expected, but it looks like LTN processing completely stops. Newly built stops don't get initialized and I think dispatcher doesn't do anything anymore either.
Mods and save available here, if there's any chance of that being helpful
:
https://www.dropbox.com/sh/e620rcbcjnd0 ... kysIa?dl=0 (sorry, mods are half a gig)
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Thu Nov 07, 2019 7:56 am
by Optera
Thanks, your save helped me finding another part in the reset process I forgot to adjust.
Hopefully this is now fixed for good.
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Thu Nov 07, 2019 9:29 am
by Boogieman14
Awesome, thanks for the swift fix:) And also, thanks for the mod!
Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop
Posted: Thu Nov 07, 2019 2:35 pm
by jeckelbros
Thanks a bunch. My saves and I owe you a debt of gratitude.