TrainsSignalSender deprecated

by Hermios

Associate signals to a train

Content
4 years ago
0.15.10 - 0.18
11
Transportation

b non-recoveralable error when replacing locomotive

4 years ago

Game crashed to main menu. Steps to reproduce:

  1. Create a train that sends a signal from the train, complete with schedule and some cars. Not sure if necessary to have it actually run through automatic mode, but in my test I did that..
  2. Turn "automatic" off.
  3. Remove only the locomotive (leaving any cars behind)
  4. Put another locomotive to the train.
  5. Turn on "Automatic" -> Crash. (It says something about index out of bounds).

The reason why I was replacing the locomotives was switching to nuclear locomotives (another mod), but I checked and it doesn't seem to be caused by the type of locomotive.

Also, there is a work-around: remove all signal definitions from the train and then replace the locomotive.

I also noticed that the signal sent from the train remains when the locomotive is removed. It might make sense to stop sending signals from the train when the "automatic" switch is turned to "manual" on the train. (I'm not sure if that is possible).

4 years ago

Hi Cremionis
Sorry, I totally missed your message.
Is the bug still there?
Thanks

Niko

4 years ago

Hello Hermios.

I tried to test it, but instead of being able to confirm whether or not the bug has been fixed I got a totally new bug.
So, here's what I did:
Updated all mods. Loaded an older save game, where I have all the stuff available, and re-researched the signal sender tech. Then I created a loop of tracks, put two stations on it and a new train. I set up the train route and added a signal to the train and switched it to "automatic". When the train arrived to the first station I got this:

"The mod TrainsSignalSender caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TrainsSignalSender::on_tick (ID 0)
Key "index" not found in property tree at ROOT[0]
stack traceback:
TrainsSignalSender/methods/trainStationFunctions.lua:28: in function 'setParameters'
TrainsSignalSender/methods/globalEvents.lua:19: in function 'OnTick'
HermiosLibs/controlLib.lua:38: in function <HermiosLibs/controlLib.lua:31>
stack traceback:
[C]: in function 'newindex'
__TrainsSignalSender
/methods/trainStationFunctions.lua:28: in function 'setParameters'
TrainsSignalSender/methods/globalEvents.lua:19: in function 'OnTick'
HermiosLibs/controlLib.lua:38: in function <HermiosLibs/controlLib.lua:31>"

My Factorio version is 0.17.79. Let me know if you need me to try some workarounds or anything..

New response