Tab playerlist crash
[f=0061619] [cawidgets.lua] Error: Error in Update(): [string "LuaUI/Widgets/gui_chili_share.lua"]:403: attempt to index field 'kick' (a nil value) [f=0061619] [cawidgets.lua] Error: Removed widget: Chili Share menu v1.24
Replay?
I could add a check, but this shouldn't happen in the first place so it'd be nice to know how that came to be.
Can happen when a spec haxxes onto your team. The fix is most likely to make creating the controls unconditional and then dig through this bigass stack of SetVisibilitys to make sure they only show when appropriate.
@DeinFreund
The issue reports a crash when the share menu has no kick button.
Commit c437090b3, “Share menu crashed on line 442.” adds a check for a missing button.
Current master uses that check for the kick button.
No test was run; this is from the code and history.
This looks resolved; it can be closed if the reporter agrees.
Found with help from OpenAI Codex and Claude Code.
c437090b3bb0820756fe5dd45346606711468a29 is just lazy crash prevention and (as its own message says) doesn't address the source of the problem. Checking for a missing button to avoid running the function is ok, but the proper fix is to make sure the button exists (or more accurately, to make sure the set of buttons adjusts to reflect the set of actions available to take depending on the state of each player).
Thanks, that makes sense. We will look at the proper fix: build the share menu buttons from the actions that are available for each player state, so the menu does not reference a button that does not exist. We will test it before opening a PR.