Hello I just faced this issue when Using the Vehicle Wagon with the Winch (from that mod). (link: https://mods.factorio.com/mod/Vehicle%20Wagon)
8863.165 Error MainLoop.cpp:1019: Exception at tick 4579398: Error while running event Vehicle Wagon::on_tick (ID 0)
Error while running event JunkTrain2::on_built_entity (ID 6)
JunkTrain2/control.lua:44: attempt to index local 'stack' (a nil value)
stack traceback:
Vehicle Wagon/control.lua:192: in function <Vehicle Wagon/control.lua:113>
8863.166 Error ServerMultiplayerManager.cpp:95: MultiplayerManager failed: "Error while running event Vehicle Wagon::on_tick (ID 0)
Error while running event JunkTrain2::on_built_entity (ID 6)
JunkTrain2/control.lua:44: attempt to index local 'stack' (a nil value)
stack traceback:
Vehicle Wagon/control.lua:192: in function <Vehicle Wagon/control.lua:113>"
After that the server seems to be running but no one can Join (isnt even showing in the server list) forcing you to restart the server.
Would you add support for that mod please.