pipeworks/wielder.lua:71: bad argument #1 to 'ipairs' (table expected, got nil) #7042

Open
opened 2024-07-03 23:39:46 +02:00 by AliasAlreadyTaken · 5 comments

When merely placing a touchscreen?

2024-07-03 15:00:15: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): ...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:71: bad argument #1 to 'ipairs' (table expected, got nil)
2024-07-03 15:00:15: ERROR[Main]: stack traceback:
2024-07-03 15:00:15: ERROR[Main]: 	[C]: in function 'ipairs'
2024-07-03 15:00:15: ERROR[Main]: 	...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:71: in function 'wielder_action'
2024-07-03 15:00:15: ERROR[Main]: 	...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:86: in function 'wielder_on'
2024-07-03 15:00:15: ERROR[Main]: 	...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:141: in function 'action_on'
2024-07-03 15:00:15: ERROR[Main]: 	...Minetest_test/bin/../mods/mesecons/mesecons/internal.lua:184: in function <...Minetest_test/bin/../mods/mesecons/mesecons/internal.lua:177>
2024-07-03 15:00:15: ERROR[Main]: 	...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute'
2024-07-03 15:00:15: ERROR[Main]: 	.../bin/../mods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute'
2024-07-03 15:00:15: ERROR[Main]: 	...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:111: in function <...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:73>
2024-07-03 15:00:15: ERROR[Main]: 	...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12>

When merely placing a touchscreen? ``` 2024-07-03 15:00:15: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): ...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:71: bad argument #1 to 'ipairs' (table expected, got nil) 2024-07-03 15:00:15: ERROR[Main]: stack traceback: 2024-07-03 15:00:15: ERROR[Main]: [C]: in function 'ipairs' 2024-07-03 15:00:15: ERROR[Main]: ...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:71: in function 'wielder_action' 2024-07-03 15:00:15: ERROR[Main]: ...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:86: in function 'wielder_on' 2024-07-03 15:00:15: ERROR[Main]: ...mt/5.8.0/Minetest_test/bin/../mods/pipeworks/wielder.lua:141: in function 'action_on' 2024-07-03 15:00:15: ERROR[Main]: ...Minetest_test/bin/../mods/mesecons/mesecons/internal.lua:184: in function <...Minetest_test/bin/../mods/mesecons/mesecons/internal.lua:177> 2024-07-03 15:00:15: ERROR[Main]: ...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute' 2024-07-03 15:00:15: ERROR[Main]: .../bin/../mods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute' 2024-07-03 15:00:15: ERROR[Main]: ...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:111: in function <...etest_test/bin/../mods/mesecons/mesecons/actionqueue.lua:73> 2024-07-03 15:00:15: ERROR[Main]: ...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_test/bin/../builtin/common/register.lua:12> ```
AliasAlreadyTaken added the
1. kind/bug
3. source/testserver
labels 2024-07-03 23:39:57 +02:00
AliasAlreadyTaken added this to the 1.1.125 milestone 2024-07-03 23:40:02 +02:00
AliasAlreadyTaken added the
2. prio/critical
label 2024-07-03 23:40:11 +02:00
Author
Owner

What item was placed here?

What item was placed here?
AliasAlreadyTaken added the
4. step/question
label 2024-07-07 18:52:46 +02:00
AliasAlreadyTaken added the
3. source/mod upstream
label 2024-07-26 23:26:43 +02:00
AliasAlreadyTaken removed this from the 1.1.125 milestone 2024-07-26 23:26:45 +02:00
AliasAlreadyTaken added the
5. result/duplicate
label 2024-07-26 23:40:15 +02:00
Author
Owner

This appears to be a duplicate of #1816

Upstream issue is here: https://github.com/mt-mods/pipeworks/issues/24

This appears to be a duplicate of #1816 Upstream issue is here: https://github.com/mt-mods/pipeworks/issues/24
Author
Owner

I'll reopen, because the duplicate issue says it is fixed, which clearly it is not.

I'll reopen, because the duplicate issue says it is fixed, which clearly it is not.
Author
Owner

2024-08-01 15:07:44: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:71: bad argument #1 to 'ipairs' (table expected, got nil)
2024-08-01 15:07:44: ERROR[Main]: stack traceback:
2024-08-01 15:07:44: ERROR[Main]: [C]: in function 'ipairs'
2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:71: in function 'wielder_action'
2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:86: in function 'wielder_on'
2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:141: in function 'action_on'
2024-08-01 15:07:44: ERROR[Main]: ...Minetest_live/bin/../mods/mesecons/mesecons/internal.lua:184: in function <...Minetest_live/bin/../mods/mesecons/mesecons/internal.lua:177>
2024-08-01 15:07:44: ERROR[Main]: ...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute'
2024-08-01 15:07:44: ERROR[Main]: .../bin/../mods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute'
2024-08-01 15:07:44: ERROR[Main]: ...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:111: in function <...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:73>
2024-08-01 15:07:44: ERROR[Main]: ...t/5.8.0/Minetest_live/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_live/bin/../builtin/common/register.lua:12>

2024-08-01 15:07:44: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '??' in callback environment_Step(): ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:71: bad argument #1 to 'ipairs' (table expected, got nil) 2024-08-01 15:07:44: ERROR[Main]: stack traceback: 2024-08-01 15:07:44: ERROR[Main]: [C]: in function 'ipairs' 2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:71: in function 'wielder_action' 2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:86: in function 'wielder_on' 2024-08-01 15:07:44: ERROR[Main]: ...mt/5.8.0/Minetest_live/bin/../mods/pipeworks/wielder.lua:141: in function 'action_on' 2024-08-01 15:07:44: ERROR[Main]: ...Minetest_live/bin/../mods/mesecons/mesecons/internal.lua:184: in function <...Minetest_live/bin/../mods/mesecons/mesecons/internal.lua:177> 2024-08-01 15:07:44: ERROR[Main]: ...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:137: in function 'old_execute' 2024-08-01 15:07:44: ERROR[Main]: .../bin/../mods/mesecons_debug/overrides/mesecons_queue.lua:27: in function 'execute' 2024-08-01 15:07:44: ERROR[Main]: ...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:111: in function <...etest_live/bin/../mods/mesecons/mesecons/actionqueue.lua:73> 2024-08-01 15:07:44: ERROR[Main]: ...t/5.8.0/Minetest_live/bin/../builtin/common/register.lua:26: in function <...t/5.8.0/Minetest_live/bin/../builtin/common/register.lua:12>
Author
Owner

I added some debug code

        def.action(fakeplayer, pointed)
        if def.eject_drops then
                local invlist = inv:get_list("main")
                if (invlist == nil) then
                        core.log("error","#7042 wilder is nil")
                        core.log("error","#7042 wilder is nil def="..dump(def))
                        core.log("error","#7042 wilder is nil pos=".. dump(pos))
                        core.log("error","#7042 wilder is nil node="..dump(node))
                        core.log("error","#7042 wilder is nil index="..dump(index))
                        return
                end
                for i, stack in ipairs(inv:get_list("main")) do
                        if not stack:is_empty() then
                                pipeworks.tube_inject_item(pos, pos, dir, stack)
                                inv:set_stack("main", i, ItemStack(""))
                        end
                end
        end

and this is what the log said:

2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={
	eject_drops = true,
	description = "\27(T@pipeworks)Node Breaker\27E",
	name = "pipeworks:nodebreaker",
	action = <function>,
	wield_hand = true,
	wield_inv = {
		width = 1,
		name = "pick",
		height = 1
	},
	tiles = {
		off = {
			"pipeworks_nodebreaker_top_off.png",
			"pipeworks_nodebreaker_bottom_off.png",
			"pipeworks_nodebreaker_side2_off.png",
			"pipeworks_nodebreaker_side1_off.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_off.png"
		},
		on = {
			"pipeworks_nodebreaker_top_on.png",
			"pipeworks_nodebreaker_bottom_on.png",
			"pipeworks_nodebreaker_side2_on.png",
			"pipeworks_nodebreaker_side1_on.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_on.png"
		}
	},
	connect_sides = {
		right = 1,
		bottom = 1,
		back = 1,
		top = 1,
		left = 1
	}
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={
	x = 1893,
	y = -2748,
	z = 1495
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={
	param1 = 0,
	name = "pipeworks:nodebreaker_on",
	param2 = 15
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={
	eject_drops = true,
	description = "\27(T@pipeworks)Node Breaker\27E",
	name = "pipeworks:nodebreaker",
	action = <function>,
	wield_hand = true,
	wield_inv = {
		width = 1,
		name = "pick",
		height = 1
	},
	tiles = {
		off = {
			"pipeworks_nodebreaker_top_off.png",
			"pipeworks_nodebreaker_bottom_off.png",
			"pipeworks_nodebreaker_side2_off.png",
			"pipeworks_nodebreaker_side1_off.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_off.png"
		},
		on = {
			"pipeworks_nodebreaker_top_on.png",
			"pipeworks_nodebreaker_bottom_on.png",
			"pipeworks_nodebreaker_side2_on.png",
			"pipeworks_nodebreaker_side1_on.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_on.png"
		}
	},
	connect_sides = {
		right = 1,
		bottom = 1,
		back = 1,
		top = 1,
		left = 1
	}
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={
	x = 1893,
	y = -2748,
	z = 1496
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={
	param1 = 0,
	name = "pipeworks:nodebreaker_on",
	param2 = 15
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={
	eject_drops = true,
	description = "\27(T@pipeworks)Node Breaker\27E",
	name = "pipeworks:nodebreaker",
	action = <function>,
	wield_hand = true,
	wield_inv = {
		width = 1,
		name = "pick",
		height = 1
	},
	tiles = {
		off = {
			"pipeworks_nodebreaker_top_off.png",
			"pipeworks_nodebreaker_bottom_off.png",
			"pipeworks_nodebreaker_side2_off.png",
			"pipeworks_nodebreaker_side1_off.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_off.png"
		},
		on = {
			"pipeworks_nodebreaker_top_on.png",
			"pipeworks_nodebreaker_bottom_on.png",
			"pipeworks_nodebreaker_side2_on.png",
			"pipeworks_nodebreaker_side1_on.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_on.png"
		}
	},
	connect_sides = {
		right = 1,
		bottom = 1,
		back = 1,
		top = 1,
		left = 1
	}
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={
	x = 1893,
	y = -2748,
	z = 1497
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={
	param1 = 0,
	name = "pipeworks:nodebreaker_on",
	param2 = 15
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={
	eject_drops = true,
	description = "\27(T@pipeworks)Node Breaker\27E",
	name = "pipeworks:nodebreaker",
	action = <function>,
	wield_hand = true,
	wield_inv = {
		width = 1,
		name = "pick",
		height = 1
	},
	tiles = {
		off = {
			"pipeworks_nodebreaker_top_off.png",
			"pipeworks_nodebreaker_bottom_off.png",
			"pipeworks_nodebreaker_side2_off.png",
			"pipeworks_nodebreaker_side1_off.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_off.png"
		},
		on = {
			"pipeworks_nodebreaker_top_on.png",
			"pipeworks_nodebreaker_bottom_on.png",
			"pipeworks_nodebreaker_side2_on.png",
			"pipeworks_nodebreaker_side1_on.png",
			"pipeworks_nodebreaker_back.png",
			"pipeworks_nodebreaker_front_on.png"
		}
	},
	connect_sides = {
		right = 1,
		bottom = 1,
		back = 1,
		top = 1,
		left = 1
	}
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={
	x = 1893,
	y = -2748,
	z = 1498
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={
	param1 = 0,
	name = "pipeworks:nodebreaker_on",
	param2 = 15
}
2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil
I added some debug code ```lua def.action(fakeplayer, pointed) if def.eject_drops then local invlist = inv:get_list("main") if (invlist == nil) then core.log("error","#7042 wilder is nil") core.log("error","#7042 wilder is nil def="..dump(def)) core.log("error","#7042 wilder is nil pos=".. dump(pos)) core.log("error","#7042 wilder is nil node="..dump(node)) core.log("error","#7042 wilder is nil index="..dump(index)) return end for i, stack in ipairs(inv:get_list("main")) do if not stack:is_empty() then pipeworks.tube_inject_item(pos, pos, dir, stack) inv:set_stack("main", i, ItemStack("")) end end end ``` and this is what the log said: ``` 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={ eject_drops = true, description = "\27(T@pipeworks)Node Breaker\27E", name = "pipeworks:nodebreaker", action = <function>, wield_hand = true, wield_inv = { width = 1, name = "pick", height = 1 }, tiles = { off = { "pipeworks_nodebreaker_top_off.png", "pipeworks_nodebreaker_bottom_off.png", "pipeworks_nodebreaker_side2_off.png", "pipeworks_nodebreaker_side1_off.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_off.png" }, on = { "pipeworks_nodebreaker_top_on.png", "pipeworks_nodebreaker_bottom_on.png", "pipeworks_nodebreaker_side2_on.png", "pipeworks_nodebreaker_side1_on.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_on.png" } }, connect_sides = { right = 1, bottom = 1, back = 1, top = 1, left = 1 } } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={ x = 1893, y = -2748, z = 1495 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={ param1 = 0, name = "pipeworks:nodebreaker_on", param2 = 15 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={ eject_drops = true, description = "\27(T@pipeworks)Node Breaker\27E", name = "pipeworks:nodebreaker", action = <function>, wield_hand = true, wield_inv = { width = 1, name = "pick", height = 1 }, tiles = { off = { "pipeworks_nodebreaker_top_off.png", "pipeworks_nodebreaker_bottom_off.png", "pipeworks_nodebreaker_side2_off.png", "pipeworks_nodebreaker_side1_off.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_off.png" }, on = { "pipeworks_nodebreaker_top_on.png", "pipeworks_nodebreaker_bottom_on.png", "pipeworks_nodebreaker_side2_on.png", "pipeworks_nodebreaker_side1_on.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_on.png" } }, connect_sides = { right = 1, bottom = 1, back = 1, top = 1, left = 1 } } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={ x = 1893, y = -2748, z = 1496 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={ param1 = 0, name = "pipeworks:nodebreaker_on", param2 = 15 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={ eject_drops = true, description = "\27(T@pipeworks)Node Breaker\27E", name = "pipeworks:nodebreaker", action = <function>, wield_hand = true, wield_inv = { width = 1, name = "pick", height = 1 }, tiles = { off = { "pipeworks_nodebreaker_top_off.png", "pipeworks_nodebreaker_bottom_off.png", "pipeworks_nodebreaker_side2_off.png", "pipeworks_nodebreaker_side1_off.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_off.png" }, on = { "pipeworks_nodebreaker_top_on.png", "pipeworks_nodebreaker_bottom_on.png", "pipeworks_nodebreaker_side2_on.png", "pipeworks_nodebreaker_side1_on.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_on.png" } }, connect_sides = { right = 1, bottom = 1, back = 1, top = 1, left = 1 } } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={ x = 1893, y = -2748, z = 1497 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={ param1 = 0, name = "pipeworks:nodebreaker_on", param2 = 15 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil def={ eject_drops = true, description = "\27(T@pipeworks)Node Breaker\27E", name = "pipeworks:nodebreaker", action = <function>, wield_hand = true, wield_inv = { width = 1, name = "pick", height = 1 }, tiles = { off = { "pipeworks_nodebreaker_top_off.png", "pipeworks_nodebreaker_bottom_off.png", "pipeworks_nodebreaker_side2_off.png", "pipeworks_nodebreaker_side1_off.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_off.png" }, on = { "pipeworks_nodebreaker_top_on.png", "pipeworks_nodebreaker_bottom_on.png", "pipeworks_nodebreaker_side2_on.png", "pipeworks_nodebreaker_side1_on.png", "pipeworks_nodebreaker_back.png", "pipeworks_nodebreaker_front_on.png" } }, connect_sides = { right = 1, bottom = 1, back = 1, top = 1, left = 1 } } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil pos={ x = 1893, y = -2748, z = 1498 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil node={ param1 = 0, name = "pipeworks:nodebreaker_on", param2 = 15 } 2024-08-01 15:18:17: ERROR[Server]: #7042 wilder is nil index=nil ```
AliasAlreadyTaken added this to the Alias@work project 2024-11-09 02:01:11 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 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: your-land/bugtracker#7042
No description provided.