mt-mods / signs_lib

Other
5 stars 12 forks source link

possible fake player crash #7

Open SwissalpS opened 2 years ago

SwissalpS commented 2 years ago
2022-03-08 23:27:20: ERROR[Main]:  /data/world//worldmods/signs_lib/api.lua:726: attempt to call method 'get_meta' (a nil value)
2022-03-08 23:27:20: ERROR[Main]: stack traceback:
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/signs_lib/api.lua:726: in function 'on_rightclick'
2022-03-08 23:27:20: ERROR[Main]:   ...hare/minetest/games/minetest_game/mods/default/torch.lua:53: in function 'on_place'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/pipeworks/wielder.lua:422: in function 'act'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/pipeworks/wielder.lua:111: in function 'wielder_on'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/pipeworks/wielder.lua:147: in function 'old_action_on'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/mesecons_ratelimiter/api.lua:36: in function 'f'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/monitoring/metrictypes/counter.lua:42: in function 'action_on'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/mesecons/mesecons/internal.lua:192: in function </data/world//worldmods/mesecons/mesecons/internal.lua:185>
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute'
2022-03-08 23:27:20: ERROR[Main]:   ...d//worldmods/mesecons_debug/overrides/mesecons_queue.lua:20: in function 'f'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/monitoring/metrictypes/counter.lua:42: in function 'execute'
2022-03-08 23:27:20: ERROR[Main]:   /data/world//worldmods/mesecons/mesecons/actionqueue.lua:111: in function </data/world//worldmods/mesecons/mesecons/actionqueue.lua:73>
2022-03-08 23:27:20: ERROR[Main]:   /usr/local/share/minetest/builtin/game/register.lua:422: in function </usr/local/share/minetest/builtin/game/register.lua:406>
2022-03-08 23:27:20: ERROR[Main]: stack traceback:

I hot-patched https://github.com/mt-mods/signs_lib/commit/14efa6eeb7b46c61f35dc55ebd3aa1b25f818671 without testing.

wsor4035 commented 2 years ago

alternatively pipeworks has a is fakeplayer method

SwissalpS commented 2 years ago

yes, I am aware and don't use it by choice. This covers other mods doing similar things that don't have that field/method.

S-S-X commented 2 years ago

Universal method for testing fake player would be type(player) ~= 'userdata' as all C++ backed instances are userdata type while Lua based fake player is table type.

BuckarooBanzay commented 2 years ago

The callstack in question:

I tried to reproduce this but somehow it doesn't trigger the error :/ EDIT: nevermind, worked with the "wood" sign

screenshot_20220309_082533

Additional background / drama

Just for context: the person triggeringreporting this error might have taken a message of me in the minetest-discord too serious/personal:

Yesterday:

Screenshot_2022-03-09_08-28-25 Screenshot_2022-03-09_08-26-57 Screenshot_2022-03-09_08-27-31

And now this morning with presumably his alt:

Screenshot_2022-03-09_08-29-19