minetest-snippets/console.lua:138: attempt to index a nil value #6358

Open
opened 2024-02-26 12:50:47 +00:00 by AliasAlreadyTaken · 3 comments

Running in snippets:

local player_name = "Boris" -- or whoever
local player = minetest.get_player_by_name(player_name)
local item = ItemStack("3d_armor:helmet_wood")
armor:equip(player, item)
armor:unequip(player, item)
minetest.disconnect_player(player_name)

leads to a crash:

2024-02-26 12:47:42: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback environment_Step(): .../Minetest_test/bin/../mods/minetest-snippets/console.lua:138: attempt to index a nil value
2024-02-26 12:47:42: ERROR[Main]: stack traceback:
2024-02-26 12:47:42: ERROR[Main]: 	.../Minetest_test/bin/../mods/minetest-snippets/console.lua:138: in function 'func'
2024-02-26 12:47:42: ERROR[Main]: 	...8.0/Minetest_test/bin/../mods/minetest-snippets/core.lua:87: in function 'log'
2024-02-26 12:47:42: ERROR[Main]: 	...8.0/Minetest_test/bin/../mods/minetest-snippets/core.lua:142: in function 'func'
2024-02-26 12:47:42: ERROR[Main]: 	...e/mt/5.8.0/Minetest_test/bin/../builtin/common/after.lua:27: in function <...e/mt/5.8.0/Minetest_test/bin/../builtin/common/after.lua:11>
2024-02-26 12:47:42: ERROR[Main]: 	...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12>
Running in snippets: ``` local player_name = "Boris" -- or whoever local player = minetest.get_player_by_name(player_name) local item = ItemStack("3d_armor:helmet_wood") armor:equip(player, item) armor:unequip(player, item) minetest.disconnect_player(player_name) ``` leads to a crash: ``` 2024-02-26 12:47:42: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback environment_Step(): .../Minetest_test/bin/../mods/minetest-snippets/console.lua:138: attempt to index a nil value 2024-02-26 12:47:42: ERROR[Main]: stack traceback: 2024-02-26 12:47:42: ERROR[Main]: .../Minetest_test/bin/../mods/minetest-snippets/console.lua:138: in function 'func' 2024-02-26 12:47:42: ERROR[Main]: ...8.0/Minetest_test/bin/../mods/minetest-snippets/core.lua:87: in function 'log' 2024-02-26 12:47:42: ERROR[Main]: ...8.0/Minetest_test/bin/../mods/minetest-snippets/core.lua:142: in function 'func' 2024-02-26 12:47:42: ERROR[Main]: ...e/mt/5.8.0/Minetest_test/bin/../builtin/common/after.lua:27: in function <...e/mt/5.8.0/Minetest_test/bin/../builtin/common/after.lua:11> 2024-02-26 12:47:42: ERROR[Main]: ...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12> ```
AliasAlreadyTaken added the
1. kind/bug
3. source/mod upstream
labels 2024-02-26 12:50:54 +00:00
Member

i can't replicate this. what version of snippets was this running against?

i can't replicate this. what version of snippets was this running against?
Author
Owner

i can't replicate this. what version of snippets was this running against?

I could reproduce it on the testserver. It's commit 31f7314591fcd967c1a9a9c7113c3bb09fdc33a7

> i can't replicate this. what version of snippets was this running against? I could reproduce it on the testserver. It's commit 31f7314591fcd967c1a9a9c7113c3bb09fdc33a7
Member

ok, that's the same version i was using when i tested this. is Boris the one executing the snippet, or is another player? neither action causes a crash for me.

ok, that's the same version i was using when i tested this. is Boris the one executing the snippet, or is another player? neither action causes a crash for me.
AliasAlreadyTaken added the
4. step/needs confirmation
label 2024-03-09 00:26:46 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#6358
No description provided.