Okay, it seems to be working really well. I tested it in multiplayer with my friends, and both of us were spamming 'Apply' without any crashes. We ran many tests, changed values, and checked our factory to ensure all the trains were functioning properly, and no crashes occurred.
However, there is one issue, though it’s unrelated to the topic of this thread. When you deconstruct a dispatcher (and also the train stop) while a train is waiting to be emptied, if you cancel the deconstruction, a crash will happen. The only way to reproduce this is by having a train waiting to unload—like when buffer chests are full, and the train can’t discharge. At that point, deconstruct both the dispatcher and the train stop, then cancel the deconstruction.
The problem is that I don’t understand why I can’t reproduce it every time. However, I can reproduce it consistently at two specific stations, which is why I’m sharing again my save file with you. When you load into the save, the character will be near the two stations where the bug occurs.
This isn't an urgent bug, so don’t worry about it.
Save file: https://drive.google.com/file/d/1SLMntOzE-B3U_54boRz79iuwdLNe100V/view?usp=sharing
The error:
The mod Rail Logistics Dispatcher 2 (2.0.24) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event RailLogisticsDispatcher::on_cancelled_deconstruction (ID 25)
RailLogisticsDispatcher/script/entity.lua:40: attempt to index local 'disp' (a nil value)
stack traceback:
RailLogisticsDispatcher/script/entity.lua:40: in function 'dispUpdateStop'
RailLogisticsDispatcher/script/entity.lua:631: in function 'entityHandleBuiltStop'
RailLogisticsDispatcher/script/entity.lua:660: in function 'entityHandleBuilt'
RailLogisticsDispatcher/control.lua:112: in function <RailLogisticsDispatcher/control.lua:103>