Rivens train-schedule station-names editor


Allows you to fix station names in a train schedule. Useful if you have elaborate wait-conditions, and you only have to change a station's name.

Tweaks
6 months ago
1.1
397
Trains

b Crash with gui click

9 months ago
(updated 9 months ago)

I got a crash with your very useful mod:

20531.670 Error MainLoop.cpp:1404: Exception at tick 51785801: Die Mod Rivens Train Schedule Editor (0.1.5) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event TrainScheduleEditor::on_gui_click (ID 1)
LuaTrain API call when LuaTrain was invalid.
stack traceback:
[C]: in function 'index'
__TrainScheduleEditor
/control.lua:417: in function 'model_to_view_full'
TrainScheduleEditor/control.lua:258: in function 'on_gui_click'
TrainScheduleEditor/control.lua:484: in function <TrainScheduleEditor/control.lua:483>

Unfortunately, I don't remember if I clicked the main button to activate the editor or if it happened with clicking one of the drop down lists to change one of the stations.

Didn't happen again after loading the last autosave and trying to edit the same schedule again.

Other train related mod: train groups https://mods.factorio.com/mod/TrainGroups
And your "Centralized train routes" mod, but I'm not using it since TrainGroups works for me and it doesn't require a dummy train.

May be you could check for entity.train.valid in control.lua::on_gui_opened() in line 282 or ui.train.valid whenever you use it. (However, I have no modding experience just browsed the API docs for some LuaTrain object validity check)

6 months ago

I added a train-validity check on the problematic line.

Could you please give 0.1.6 a try? Thank you!

6 months ago

Added a bunch more checks, so please try 0.1.7 ^_^

New response