crash in MCL when deployer contains food items
nonfreegithub opened this issue · comments
Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org commented
steps to reproduce:
- put in a deployer any food item (example a potato)
- give to deployer a redstone signal
server crashs
ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback environment_Step(): ...t/bin/../games/MineClone2/mods/PLAYER/mcl_hunger/api.lua:18: attempt to call method 'get_meta' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: ...t/bin/../games/MineClone2/mods/PLAYER/mcl_hunger/api.lua:18: in function 'get_hunger'
ERROR[Main]: ...in/../games/MineClone2/mods/PLAYER/mcl_hunger/hunger.lua:41: in function 'on_place'
ERROR[Main]: .../minetest/bin/../mods/pipeworks/wielder.lua:439: in function 'act'
ERROR[Main]: .../minetest/bin/../mods/pipeworks/wielder.lua:126: in function 'wielder_on'
ERROR[Main]: .../minetest/bin/../mods/pipeworks/wielder.lua:162: in function 'action_on'
ERROR[Main]: ...mes/MineClone2/mods/ITEMS/REDSTONE/mesecons/internal.lua:203: in function <...mes/MineClone2/mods/ITEMS/REDSTONE/mesecons/internal.lua:196>
ERROR[Main]: .../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:97: in function 'execute'
ERROR[Main]: .../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:86: in function <.../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:63>
ERROR[Main]: .../minetest/bin/../builtin/common/register.lua:26: in function <.../minetest/bin/../builtin/common/register.lua:12>
SX commented
Looking at the stack trace sounds like issue with MCL hunger, it should check if player is actually online and is real player.
OgelGames commented
Yep, there's only a useless is_player()
check: (which returns true for fake players too) https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/PLAYER/mcl_hunger/hunger.lua#L5-L7