Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with Lua command #13

Open
OgelGames opened this issue May 6, 2024 · 0 comments
Open

Crash with Lua command #13

OgelGames opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@OgelGames
Copy link

2024-05-06 05:51:06: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'mtui' in callback environment_Step(): /data/world//worldmods/mtui/bridge_tx.lua:26: attempt to get length of local 'data' (a nil value)
2024-05-06 05:51:06: ERROR[Main]: stack traceback:
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/mtui/bridge_tx.lua:26: in function 'send_commands'
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/mtui/bridge_tx.lua:65: in function 'send_command'
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/mtui/bridge_rx.lua:52: in function 'send'
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/mtui/bridge_rx.lua:62: in function 'callback'
2024-05-06 05:51:06: ERROR[Main]: 	/usr/local/share/minetest/builtin/game/misc.lua:213: in function 'f'
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/monitoring/metrictypes/counter.lua:43: in function 'func'
2024-05-06 05:51:06: ERROR[Main]: 	/usr/local/share/minetest/builtin/common/after.lua:20: in function 'globalstep'
2024-05-06 05:51:06: ERROR[Main]: 	/data/world//worldmods/monitoring/builtin/globalstep.lua:73: in function </data/world//worldmods/monitoring/builtin/globalstep.lua:55>
2024-05-06 05:51:06: ERROR[Main]: 	/usr/local/share/minetest/builtin/common/register.lua:26: in function </usr/local/share/minetest/builtin/common/register.lua:12>

Happened when executing return minetest.get_player_by_name("AceRichman"):get_properties(). I'm guessing the returned table couldn't be formatted to JSON.

mtui_mod/bridge_tx.lua

Lines 24 to 27 in 55cf79c

local data = minetest.write_json(commands)
if metric_size then
metric_size.inc(#data)
end

@BuckarooBanzay BuckarooBanzay added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants