today I tried to break some rails because they werent needed but then the following message appeared:
"Error while running event ElectricTrain::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid stack traceback: ElectricTrain/lua/events.lua:39: in function 'TrainPower' ElectricTrain/lua/events.lua:102: in function 'on_tick' ElectricTrain/control.lua:12: in function ElectricTrain/control.lua:11"
didnt happen if I broke the train before breaking the rails but when I replaced the train it happened again