Utilities
1 year, 1 month ago
1.0 - 1.1
1.66K

b Crash while clicking on alert item

1 year, 5 months ago

595.669 Error MainLoop.cpp:1382: Exception at tick 45494592: The mod Programmable Speaker Alerts List 2 (1.3.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AlertsList2::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__AlertsList2
/control.lua:153: in function 'on_click'
AlertsList2/control.lua:324: in function <AlertsList2/control.lua:321>
604.955 Script @simhelper/modloader.lua:90: ignored filters
604.955 Script @simhelper/modloader.lua:90: ignored filters

1 year, 5 months ago

Only that one item was bad, other items worked.

1 year, 1 month ago

I am seeing the following stacktrace frequently when clicking on alarm icons

323.822 Error MainLoop.cpp:1389: Exception at tick 37543597: The mod Programmable Speaker Alerts List 2 (1.3.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AlertsList2::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__AlertsList2
/control.lua:153: in function 'on_click'
AlertsList2/control.lua:324: in function <AlertsList2/control.lua:321>

The game "crashes" and takes me back to the main menu screen. It happens for almost all alarms.

I'm currently running on Factorio 1.1.92 with a bunch of additional plugins.

I'm happy to test/ help w/ troubleshooting in case you have specifics to test.

1 year, 1 month ago

Hi!
I was unavailable for a couple of days, so please excuse my late answer.
I just updated to Factorio V 1.1.92 and found no issues.

I see a missing check if the actual player (from who the click is coming from) is a null-value. That was never an issue before, but I try to find the time to fix that.

Regards
Thebri

1 year, 1 month ago
(updated 1 year, 1 month ago)

Having the same problem:

The mod Programmable Speaker Alerts List 2 (1.3.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event AlertsList2::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__AlertsList2
/control.lua:153: in function 'on_click'
AlertsList2/control.lua:324: in function <AlertsList2/control.lua:321>

1 year, 1 month ago

I just uploaded a fix as version 1.3.3. Could you test if your problem goes away?

1 year, 1 month ago

I can confirm this works for me since updating to 1.3.3

1 year, 1 month ago

Very good!

11 months ago

@Therbi

Reproduced in 1.3.3

Error while running event AlertsList2::on_gui_click (ID 1)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
    [C]: in function '__index'
    __AlertsList2__/control.lua:153: in function 'on_click'
    __AlertsList2__/control.lua:324: in function <__AlertsList2__/control.lua:321>
11 months ago

I don't understand how this is happening becuase sometimes it works, and sometimes crashes.

11 months ago

Hi Hares!

Are you using Version 1.3.3? I already did a fix in this version at exactly the code line your error is pointing at.

On another note: Afaik the error can actually only occur if the speaker you are clicking in the AlertList UI has been already deconstructed in game.

11 months ago

Yes, I was at 1.3.3
However, I can't reproduce the issue anymore. Looks like that was caused by some specific speaker.

4 months ago

Changing line 152 from "if speaker then" to "if speaker and speaker.valid then" fixes the problem. Probably some invalid speakers are not removed from cache.

valid :: booleanRead
Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.

New response