[2.1.9] Crash in helpers.recv_udp(0) with headless server
Posted: Sat Jul 04, 2026 7:46 pm
I haven't tried it with the GUI. This is from Claude messing with the dedicated server.
Trivial mod to call recv_udp:
Trivial mod to call recv_udp:
Start the server:script.on_event(defines.events.on_tick, function()
helpers.recv_udp(0)
end)
Send a packet:factorio --start-server repro.zip --enable-lua-udp 34199
Boom:python3 -c "import socket; socket.socket(socket.AF_INET, socket.SOCK_DGRAM).sendto(b'hello', ('127.0.0.1', 34199))"
I found a write_file crash viewtopic.php?p=697640 that sounds vaguely related?(nil) (0): Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...)
(nil) (0): TickClosure::add(InputAction&&)
(nil) (0): NetworkInputListener::tryToSendNextTickClosure(unsigned char)
(nil) (0): non-virtual thunk to ServerMultiplayerManager::updateMultiplayerInputInternal()
(nil) (0): MainLoop::gameUpdateStep(MultiplayerManagerBase*, Scenario*, AppManager*, MainLoop::HeavyMode)
...
17.423 Error TickClosure.cpp:91: Trying to add invalid input action to the closure.