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

locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value) #18

Open
Bastrabun opened this issue Feb 8, 2021 · 0 comments · May be fixed by #20
Open

locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value) #18

Bastrabun opened this issue Feb 8, 2021 · 0 comments · May be fixed by #20

Comments

@Bastrabun
Copy link

Bastrabun commented Feb 8, 2021

I'm not sure what exactly the user did, most likely he tried to configure a shared locked door.

2021-01-25 06:39:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-01-25 06:39:39: ERROR[Main]: stack traceback:
2021-01-25 06:39:39: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/init.lua:493: in function 'lock_handle_input'
2021-01-25 06:39:39: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/shared_locked_chest.lua:96: in function </home/mtlive1/.minetest/mods/locks/shared_locked_chest.lua:95>

Seems like it happened 3 times at least:

2021-01-25 06:39:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-02-04 14:50:36: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-02-05 08:47:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)

These are the clues extracted from the three different incidents:

1:

2021-01-25 06:39:39: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-01-25 06:39:39: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/init.lua:493: in function 'lock_handle_input'
2021-01-25 06:39:39: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/shared_locked_chest.lua:96: in function </home/mtlive1/.minetest/mods/locks/shared_locked_chest.lua:95>

2:

2021-02-04 14:50:07: ACTION[Server]: player USER crafts locks:lock 2
[..]
2021-02-04 14:50:12: ACTION[Server]: USER digs doors:door_wood_a at (2091,6,1511)
2021-02-04 14:50:20: ACTION[Server]: player USER crafts locks:door
[..]
2021-02-04 14:50:27: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.
[..]
2021-02-04 14:50:36: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-02-04 14:50:36: ERROR[Main]: stack traceback:
2021-02-04 14:50:36: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/init.lua:493: in function 'lock_handle_input'
2021-02-04 14:50:36: ERROR[Main]: 	...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:121: in function <...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:120>

Seems like a user went on his way to craft a shared locked door. I didn't see him place the door though.

3:

2021-02-05 08:45:54: [Server]: static int ModApiServer::l_get_player_information(lua_State*): peer was not found
[..]
2021-02-05 08:47:16: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'locks' in callback node_on_receive_fields(): /home/mtlive1/.minetest/mods/locks/init.lua:493: attempt to index field 'locks_sent_lock_command' (a nil value)
2021-02-05 08:47:16: ERROR[Main]: 	/home/mtlive1/.minetest/mods/locks/init.lua:493: in function 'lock_handle_input'
2021-02-05 08:47:16: ERROR[Main]: 	...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:88: in function <...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:87>

The peer was not found warning appeared several times in a row before the incident, but I do not know whether there is a connection. On the third occasion the door was most likely already in place.

These log messages appear, when someone places a shared locked door:

2020-12-09 19:30:42: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.
2021-01-29 03:15:40: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.
2021-01-30 03:46:02: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.
2021-02-04 14:50:27: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.
2021-02-06 13:15:39: WARNING[Server]: Assignment to undeclared global "dir" inside a function at ...e/mtlive1/.minetest/mods/locks/shared_locked_xdoors2.lua:164.

For my reference 202

@cheapie cheapie linked a pull request Sep 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant