Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Adds new train stops forming a highly configurable logistic network.

Moderator: Optera

Post Reply
DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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?
Attachments
factorio-current.log
(113.6 KiB) Downloaded 134 times

DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by DrJones »

Sent a download link for the save as DM.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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.

DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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?

jeckelbros
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Sep 11, 2019 1:31 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by Optera »

Sorry for the inconvenience.
I forgot to actually remove invalid stop indexes after finding one.

Should be fixed in next release.

jeckelbros
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Sep 11, 2019 1:31 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by jeckelbros »

Thanks a ton. Cheers

DrJones
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Thu Sep 08, 2016 11:13 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by DrJones »

Thanks for the fix, Optera! Much appreciated!

jeckelbros
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Sep 11, 2019 1:31 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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

Boogieman14
Filter Inserter
Filter Inserter
Posts: 772
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post 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.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 772
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by Boogieman14 »

Awesome, thanks for the swift fix:) And also, thanks for the mod!
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

jeckelbros
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Sep 11, 2019 1:31 pm
Contact:

Re: Error "Invalid stop unit_number" after bot-deconstructing a LTN stop

Post by jeckelbros »

Thanks a bunch. My saves and I owe you a debt of gratitude.

Post Reply

Return to “Logistic Train Network”