Right-click on Villager crash #2014

Closed
opened 2022-02-21 00:25:44 +01:00 by kabou · 8 comments
Contributor

Right-clicking on (non-nitwit) villager crashes the server.

2022-02-20 23:42:55: ACTION[Server]: singleplayer right-clicks object 3: LuaEntitySAO "mobs_mc:villager" at (-32,12,376)
2022-02-20 23:42:55: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback luaentity_run_simple_callback(): ...games/mineclone2/mods/IT
EMS/mcl_enchanting/groupcaps.lua:46: attempt to index a nil value
2022-02-20 23:42:55: ERROR[Main]: stack traceback:
2022-02-20 23:42:55: ERROR[Main]:       ...games/mineclone2/mods/ITEMS/mcl_enchanting/groupcaps.lua:46: in function 'update_groupcaps'
2022-02-20 23:42:55: ERROR[Main]:       ...st/games/mineclone2/mods/ITEMS/mcl_enchanting/engine.lua:37: in function 'load_enchantments'
2022-02-20 23:42:55: ERROR[Main]:       ...test/games/mineclone2/mods/ENTITIES/mobs_mc/villager.lua:462: in function 'set_trade'
2022-02-20 23:42:55: ERROR[Main]:       ...test/games/mineclone2/mods/ENTITIES/mobs_mc/villager.lua:1020: in function 'on_rightclick'
2022-02-20 23:42:55: ERROR[Main]:       ...mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua:52: in function <...mods/ENTITIES/mcl_mobs/api/mob_functions/i
nteraction.lua:45>

Noticeable observation:
First I clicked on a librarian/cartographer type villager and the server crashed. After restarting the game, the same villager was now a cleric. Right-clicking crashed the server. Upon restart, the villager was now a armorer/weaponsmith type. Right-clicking still caused a crash. Crash log in debug.txt is always the same.

Right-clicking on (non-nitwit) villager crashes the server. ``` 2022-02-20 23:42:55: ACTION[Server]: singleplayer right-clicks object 3: LuaEntitySAO "mobs_mc:villager" at (-32,12,376) 2022-02-20 23:42:55: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback luaentity_run_simple_callback(): ...games/mineclone2/mods/IT EMS/mcl_enchanting/groupcaps.lua:46: attempt to index a nil value 2022-02-20 23:42:55: ERROR[Main]: stack traceback: 2022-02-20 23:42:55: ERROR[Main]: ...games/mineclone2/mods/ITEMS/mcl_enchanting/groupcaps.lua:46: in function 'update_groupcaps' 2022-02-20 23:42:55: ERROR[Main]: ...st/games/mineclone2/mods/ITEMS/mcl_enchanting/engine.lua:37: in function 'load_enchantments' 2022-02-20 23:42:55: ERROR[Main]: ...test/games/mineclone2/mods/ENTITIES/mobs_mc/villager.lua:462: in function 'set_trade' 2022-02-20 23:42:55: ERROR[Main]: ...test/games/mineclone2/mods/ENTITIES/mobs_mc/villager.lua:1020: in function 'on_rightclick' 2022-02-20 23:42:55: ERROR[Main]: ...mods/ENTITIES/mcl_mobs/api/mob_functions/interaction.lua:52: in function <...mods/ENTITIES/mcl_mobs/api/mob_functions/i nteraction.lua:45> ``` Noticeable observation: First I clicked on a librarian/cartographer type villager and the server crashed. After restarting the game, the same villager was now a cleric. Right-clicking crashed the server. Upon restart, the villager was now a armorer/weaponsmith type. Right-clicking still caused a crash. Crash log in debug.txt is always the same.
kabou added the
bug
#P1 CRITICAL
labels 2022-02-21 00:26:45 +01:00
Contributor

MineClone2 version - latest git? Minetest version?

MineClone2 version - latest git? Minetest version?
Author
Contributor

sorry for the omission.

mineclone2 current git master HEAD c392fd0269
minetest 5.6-dev commit be05c9022d (should not be substantially different from 5.5 release)

sorry for the omission. mineclone2 current git master HEAD https://git.minetest.land/MineClone2/MineClone2/commit/c392fd02699193207e017387faae6ba8d976b395 minetest 5.6-dev commit https://github.com/minetest/minetest/commit/be05c9022d8b6eff63f477bc8ca52efd7d631cb6 (should not be substantially different from 5.5 release)
Contributor

Confirmed with Minetest 5.5.0 and latest MCL2 git master.

P.S. I have a 5-villager trading hall and once I right-clicked a villager with the server crashing, once I got back in the game all those villagers randomly changed professions. Some might stay the same between crashes, but many times they just change.

Confirmed with Minetest 5.5.0 and latest MCL2 git master. P.S. I have a 5-villager trading hall and once I right-clicked a villager with the server crashing, once I got back in the game all those villagers randomly changed professions. Some might stay the same between crashes, but many times they just change.
Contributor

please see mobs pr ^^

EDIT: MineClone2/MineClone2#1992

please see mobs pr ^^ EDIT: https://git.minetest.land/MineClone2/MineClone2/pulls/1992
Contributor

not sure if i updated the server but p sure i've fixed this 2 times now ^^

not sure if i updated the server but p sure i've fixed this 2 times now ^^
Author
Contributor

crossposted from #1992:

@cora your "fix crash on opening villager formspec" patch fixes the crashes with villagers.

Please merge at least this commit with master.

crossposted from #1992: @cora your ["fix crash on opening villager formspec"](https://git.minetest.land/MineClone2/MineClone2/commit/e1573d1c6207aadb74b91f1e1ec73ce886a8a9c7) patch fixes the crashes with villagers. Please merge at least this commit with master.
Contributor

The time would be better spent testing the mobs branch imo.

The time would be better spent testing the mobs branch imo.
Author
Contributor

The time would be better spent testing the mobs branch imo.

Fair.

> The time would be better spent testing the mobs branch imo. Fair.
cora closed this issue 2022-02-25 17:47:55 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 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: VoxeLibre/VoxeLibre#2014
No description provided.