LTN Combinator Modernized


Add a combinator with friendly GUI to manage LTN Control Signals for each LTN Train Stop

Content
5 months ago
1.0 - 1.1
78.6K
Trains Circuit network

b [Fixed] Servercrash when quickly switching between Combinator and something else

10 months ago
(updated 10 months ago)

My sis recently noticed, that she could bring down our SE Server when working with the LTN Combinators in map view. As SE does have the satellite view, she tried looking into a chest shortly after opening a Combinator, but as she was in map view instead, it crashed the server. So I did some fiddling around with it now.

It is exclusive to the map view, and it does not matter what planet/moon/whatever I am on. When opening a LTN Combinator in map view and then quickly switching to another object (chest, powerpole, trainstop...), it returns an error in the log and crashes the server.
I'm also clicking on the Combinator and on the chest within less than a second. Letting it properly open before switching targets doesn't crash, so I'm probably interrupting some code before it can finish I'd assume.
It also only appears to happen on a headless server, at least I wasn't able to reproduce the same crash when in singleplayer, so there is probably some latency involved.

Here's some error logs as well from 2 different crashes, first one I clicked a chest after the Combinator, second one was a powerpole.

Error while running event LTN_Combinator_Modernized::ltnc-linked-open-gui (ID 196)
LuaContainerControlBehavior doesn't contain key signals_count.
stack traceback:
[C]: in function 'index'
__LTN_Combinator_Modernized
/script/ltn_combinator.lua:425: in function 'sort_signals'
LTN_Combinator_Modernized/script/ltn_combinator.lua:1392: in function 'open_gui'
LTN_Combinator_Modernized/script/ltn_combinator.lua:1460: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>"


Error while running event LTN_Combinator_Modernized::ltnc-linked-open-gui (ID 196)
LTN_Combinator_Modernized/script/ltn_combinator.lua:425: attempt to index local 'ctl' (a nil value)
stack traceback:
LTN_Combinator_Modernized/script/ltn_combinator.lua:425: in function 'sort_signals'
LTN_Combinator_Modernized/script/ltn_combinator.lua:1392: in function 'open_gui'
LTN_Combinator_Modernized/script/ltn_combinator.lua:1460: in function 'handler'
core/lualib/event_handler.lua:47: in function <core/lualib/event_handler.lua:45>"

10 months ago

Fixed for next version. Thanks for the report and detailed reproduction steps. It definitely is related to latency and being in map view.

10 months ago

Sweet, glad it was helpful ^^

10 months ago

Just released 2.1.0. Should be fixed here.

New response