You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not 100% certain on the repro. A user on my server managed to make it crash while operating a digtron. I suspect that they either dug a piston, or placed one. Below is the stack trace from the server logs, along with excerpts from the mods at the relevant lines of code. It is possible that the bug is in digtron, but after looking at the code, I'm thinking that mesecons_pistons could be more defensive when handling the pos parameter in its piston_orientation() callback.
1hit@EdgyNet:~$ ./opt/minetest/bin/minetestserver --version
Minetest 5.8.0 (Linux)
Using LuaJIT 2.1.0-beta3
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
STATIC_SHAREDIR="/home/1hit/opt/minetest/share/minetest"
1hit@EdgyNet:~$ (cd ./worlds/world/worldmods/digtron; git rev-parse HEAD)
0c8f652b2c9029615a937434a3de5a78d8d5172d
1hit@EdgyNet:~$ (cd ./worlds/world/worldmods/mesecons; git rev-parse HEAD)
cffbc33e6dfcf01f62d890b7e71b4fb46cfc8063
1hit@EdgyNet:~$ ./bin/crash-report.py < ./logs/2024-03-25.txt
ServerError: AsyncErr: Lua: Runtime error from mod 'digtron' in callback node_on_receive_fields(): ...orlds/world/worldmods/mesecons/mesecons_pistons/init.lua:133: attempt to index a nil value
stack traceback:
...orlds/world/worldmods/mesecons/mesecons_pistons/init.lua:133: in function 'after_place_node'
.../worlds/world/worldmods/digtron/util_item_place_node.lua:155: in function 'item_place_node'
...t/worlds/world/worldmods/digtron/nodes/node_builders.lua:404: in function 'execute_build'
...it/worlds/world/worldmods/digtron/util_execute_cycle.lua:345: in function 'execute_dig_cycle'
...orlds/world/worldmods/digtron/nodes/node_controllers.lua:166: in function 'auto_cycle'
...orlds/world/worldmods/digtron/nodes/node_controllers.lua:283: in function <...orlds/world/worldmods/digtron/nodes/node_controllers.lua:257>
mesecons_pistons/init.lua:125-142 Line 133 is node.param2 = orientations[node.param2][1]
localfunctionpiston_orientate(pos, placer)
mesecon.mvps_set_owner(pos, placer)
ifnotplacerthenreturnendlocalpitch=math.deg(placer:get_look_vertical())
localnode=minetest.get_node(pos)
ifpitch>55thennode.param2=orientations[node.param2][1]
elseifpitch<-55thennode.param2=orientations[node.param2][2]
elsereturnendminetest.swap_node(pos, node)
-- minetest.after, because on_placenode for unoriented piston must be p$minetest.after(0, mesecon.on_placenode, pos, node)
end
digtron/util_item_place_node.lua:150-159 Line 155 is the inner if statement.
-- Run callback, using genuine player for per-node definition.ifdef.after_place_nodethen-- Deepcopy place_to and pointed_thing because callback can mod$localplace_to_copy= {x=place_to.x, y=place_to.y, z=place_to.z}
localpointed_thing_copy=copy_pointed_thing(pointed_thing)
ifdef.after_place_node(place_to_copy, placer, itemstack,
pointed_thing_copy) thentake_item=falseendend
The text was updated successfully, but these errors were encountered:
I am not 100% certain on the repro. A user on my server managed to make it crash while operating a digtron. I suspect that they either dug a piston, or placed one. Below is the stack trace from the server logs, along with excerpts from the mods at the relevant lines of code. It is possible that the bug is in digtron, but after looking at the code, I'm thinking that mesecons_pistons could be more defensive when handling the
pos
parameter in itspiston_orientation()
callback.mesecons_pistons/init.lua:125-142
Line 133 isnode.param2 = orientations[node.param2][1]
digtron/util_item_place_node.lua:150-159
Line 155 is the innerif
statement.The text was updated successfully, but these errors were encountered: