LTN Combinator Modernized


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

Content
2 months ago
1.0 - 1.1
89.5K
Trains Circuit network

b [Fixed] Crash in on_gui_click

3 years ago

Just had a multiplayer server crash with this report:

16142.466 Error MainLoop.cpp:1285: Exception at tick 50506124: The mod LTN Combinator Modernized (0.9.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_gui_click (ID 1)
__LTN_Combinator_Modernized__/script/ltn-combinator.lua:317: attempt to perform arithmetic on local 'slot' (a nil value)
stack traceback:
        __LTN_Combinator_Modernized__/script/ltn-combinator.lua:317: in function '_validate_slot'
        __LTN_Combinator_Modernized__/script/ltn-combinator.lua:284: in function 'set_slot_value'
        __LTN_Combinator_Modernized__/script/gui.lua:86: in function 'set_new_output_value'
        __LTN_Combinator_Modernized__/script/gui.lua:299: in function 'handler'
        __flib__/gui.lua:390: in function <__flib__/gui.lua:376>
16142.466 Error ServerMultiplayerManager.cpp:91: MultiplayerManager failed: "The mod LTN Combinator Modernized (0.9.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_gui_click (ID 1)
__LTN_Combinator_Modernized__/script/ltn-combinator.lua:317: attempt to perform arithmetic on local 'slot' (a nil value)
stack traceback:
        __LTN_Combinator_Modernized__/script/ltn-combinator.lua:317: in function '_validate_slot'
        __LTN_Combinator_Modernized__/script/ltn-combinator.lua:284: in function 'set_slot_value'
        __LTN_Combinator_Modernized__/script/gui.lua:86: in function 'set_new_output_value'
        __LTN_Combinator_Modernized__/script/gui.lua:299: in function 'handler'
        __flib__/gui.lua:390: in function <__flib__/gui.lua:376>"
3 years ago
(updated 3 years ago)

Blargh,

Any chance you have a series of steps to reproduce? Or, a save that it reproduces in? I have been unable to reproduce this specific crash.

3 years ago

I got similar issue with on_gui_confirmed event.
With another map I have been hosting, same crash happened with the other LTN combinator mod (LTN combinator for 1.1).
I was still not able to reproduce this issue reliability.
Note that this issue never happened when I was playing in singleplayer, so I suggest that it is specific to multiplayer.

Crashed when a client try to change the requested item count.

https://imgur.com/cGwaFUf

82896.393 Error MainLoop.cpp:1285: Exception at tick 31944374: The mod LTN Combinator Modernized (0.9.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_gui_confirmed (ID 144)
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: attempt to perform arithmetic on local 'slot' (a nil value)
stack traceback:
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: in function '_validate_slot'
LTN_Combinator_Modernized/script/ltn-combinator.lua:284: in function 'set_slot_value'
LTN_Combinator_Modernized/script/gui.lua:86: in function 'set_new_output_value'
LTN_Combinator_Modernized/script/gui.lua:291: in function 'handler'
flib/gui.lua:390: in function <flib/gui.lua:376>
82896.394 Error ServerMultiplayerManager.cpp:91: MultiplayerManager failed: "The mod LTN Combinator Modernized (0.9.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_gui_confirmed (ID 144)
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: attempt to perform arithmetic on local 'slot' (a nil value)
stack traceback:
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: in function '_validate_slot'
LTN_Combinator_Modernized/script/ltn-combinator.lua:284: in function 'set_slot_value'
LTN_Combinator_Modernized/script/gui.lua:86: in function 'set_new_output_value'
LTN_Combinator_Modernized/script/gui.lua:291: in function 'handler'
flib/gui.lua:390: in function <flib/gui.lua:376>"
82896.394 Info ServerMultiplayerManager.cpp:783: updateTick(31944374) changing state from(InGame) to(Failed)
82896.395 Quitting: multiplayer error.

3 years ago
(updated 3 years ago)

The mod LTN Combinator Modernized (0.9.8) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_gui_click (ID 1)
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: attempt to perform arithmetic on local 'slot' (a nil value)
stack traceback:
LTN_Combinator_Modernized/script/ltn-combinator.lua:317: in function '_validate_slot'
LTN_Combinator_Modernized/script/ltn-combinator.lua:284: in function 'set_slot_value'
LTN_Combinator_Modernized/script/gui.lua:86: in function 'set_new_output_value'
LTN_Combinator_Modernized/script/gui.lua:299: in function 'handler'
flib/gui.lua:390: in function <flib/gui.lua:376>

Server shutdown after this error. This is from log. I dont know where has been cklicked

3 years ago

I'm trying to track this down. This actually in the part of the code from the original as confirmed by nans post above. I have yet to reproduce it, and I'm hesitant to make a blind change and just hope that avoids it. However, that may be where we are.

Can any of you provide a save game that this happens with?

I'd obviously like to handle whatever is going on that someone is trying vs. just bail if the value isn't right.

3 years ago

Are you running any other mods that may have some interaction with combinators?

3 years ago

Sorry for the delay in response, it's been a crazy past couple weeks.

The crash happened on my multiplayer server - only one person (not me) was online, and just generically "adjusting LTN requests" when it happened. We haven't seen it since - was a one-time thing, and we use LTN combinators extensively. We've since tried to reproduce a couple different ways, but haven't hit the secret combination yet.

Re: other combinators: We do have the Math Coprocessor mod installed, although none of those are in use. It IS a relatively heavily modded game with ~40 mods or so running.

3 years ago

My server hit this yesterday as well. No repro steps known (when we reloaded the save it didn't re-crash). At the time there were two of us modifying two separate LTN combinators at the same time. There was a console message saying something about the LTN combinator being missing (did it get destroyed?) and then it crashed moments later. We are running Space Exploration with a handful of other mods. Full server log: https://paste.c-net.org/BellmanStandby

3 years ago

My server hit this yesterday as well. No repro steps known (when we reloaded the save it didn't re-crash). At the time there were two of us modifying two separate LTN combinators at the same time. There was a console message saying something about the LTN combinator being missing (did it get destroyed?) and then it crashed moments later. We are running Space Exploration with a handful of other mods. Full server log: https://paste.c-net.org/BellmanStandby

Thanks for the log st4x0r. This is definitely a different crash than the one Blargh2015 reported, but needs to be fixed none-the-less.

3 years ago

@st4rx0r

I think I have the issue you experienced covered. I was not able to reproduce it, but there is a check to make sure it does not crash with the same condition.

3 years ago

Blargh2015 I have been unable to reproduce this crash with a lot of attempts. :( I'll keep working at it, and if you narrow down any conditions to reliably cause it to crash please pass them along.

3 years ago

Yeah, these do appear to be the same after all. Just coming at it from different entry points. Should have been fixed as of 1.0.0

New response