Mobs seem to be over limit in inactive areas (?) #978

Closed
opened 2021-01-07 23:46:52 +01:00 by kay27 · 13 comments
Contributor

IDK what is it but something like that is happening it all worlds after latest mob changes:

2021-01-07 08:04:03: ERROR[Server]: suspiciously large amount of objects detected: 134 in (6,-1815,-27); removing all of them.
2021-01-07 12:54:35: ERROR[Server]: suspiciously large amount of objects detected: 201 in (1,-1815,-28); removing all of them.
2021-01-07 13:01:19: ERROR[Server]: suspiciously large amount of objects detected: 167 in (6,-1814,-24); removing all of them.
2021-01-07 13:19:18: ERROR[Server]: suspiciously large amount of objects detected: 159 in (0,-1813,-20); removing all of them.
2021-01-07 15:55:54: ERROR[Server]: suspiciously large amount of objects detected: 312 in (4,-1810,3); removing all of them.

When I teleport there to check - there is nothing, Im just being killed by the void

IDK what is it but something like that is happening it all worlds after latest mob changes: ```log 2021-01-07 08:04:03: ERROR[Server]: suspiciously large amount of objects detected: 134 in (6,-1815,-27); removing all of them. 2021-01-07 12:54:35: ERROR[Server]: suspiciously large amount of objects detected: 201 in (1,-1815,-28); removing all of them. 2021-01-07 13:01:19: ERROR[Server]: suspiciously large amount of objects detected: 167 in (6,-1814,-24); removing all of them. 2021-01-07 13:19:18: ERROR[Server]: suspiciously large amount of objects detected: 159 in (0,-1813,-20); removing all of them. 2021-01-07 15:55:54: ERROR[Server]: suspiciously large amount of objects detected: 312 in (4,-1810,3); removing all of them. ``` ~~When I teleport there to check - there is nothing, Im just being killed by the void~~
Contributor

Check this out: #947

Check this out: #947
Author
Contributor

Large amount is one thing... but what do you think about y coordinate like -1815?
This error is rather rare - I've collected this from daily log - it has happened only five times, but still... still... what the objects might be there - under the bedrock layer?

~~Large amount is one thing... but what do you think about y coordinate like -1815?~~ **This error is rather rare - I've collected this from daily log - it has happened only five times**, but still... ~~still... what the objects might be there - under the bedrock layer?~~
Author
Contributor

I've written the following code and added to the end of mods/MISC/mcl_commands/init.lua:


local function list_objects(p, r)
	minetest.chat_send_all('performing list_objects '..minetest.pos_to_string(p)..' '..tostring(r))
	local ol = minetest.get_objects_inside_radius(p or {x=0,y=0,z=0}, r or 32767)
	minetest.chat_send_all('list_objects result: '..#ol.." object(s)")
	for n, obj in ipairs(ol) do
		local s = "#"..tostring(n)..":"
		if obj == nil then
			s = s.." nil"
		else
			local pos = obj:get_pos()
			if pos then
				s = s.." "..minetest.pos_to_string(pos,1)
			end
			local hp = obj:get_hp()
			if hp then
				s = s.." hp="..tostring(hp)
			end
			local ent = obj:get_luaentity()
			if ent then
				s = s.." entity"
				if ent.name then
					s = s..".name="..ent.name
				end
				if ent.itemstring then
					s = s.." .itemstring="..ent.itemstring
				end
				if ent.age then
					s = s.." .age="..tostring(ent.age)
				end
				if ent._removed then
					s = s.." _removed"
				end
				if ent._insta_collect then
					s = s.." _insta_collect"
				end
				if ent.physical_state then
					s = s.." physical_state"
				end
				if ent._magnet_timer then
					s = s.." ._magnet_timer="..tostring(ent._magnet_timer)
				end
				if ent._cmi_is_mob then
					s = s.." _cmi_is_mob"
				end
			end
			if obj:is_player() then
				s=s.." player"
				local playername = obj:get_player_name()
				if playername then
					s=s..".name="..playername
				end
			end
		end
		minetest.log("warning", "[objlst] "..s)
	end
end

minetest.register_chatcommand("listobjects", {
	params = S("[[<pos>] <radius>]"),
	description = S("Print objects to log file"),
	privs = {server=true},
	func = function(name, params)
		local pos, radius = {x=0,y=0,z=0}, 32767
		local P, i = {}, 0
		for str in string.gmatch(params, "([^ ]+)") do
			i = i + 1
			P[i] = str
		end
		if i > 2 then
			return false, S("Error: Too many parameters!")
		end
		if i > 0 then
			radius = tonumber(P[i])
		end
		if i == 2 then
			pos = minetest.string_to_pos(P[1])
		end
		if not radius then
			return false, S("Error: Incorrect radius value")
		end
		if not pos then
			return false, S("Error: Wrong position")
		end
		list_objects(pos, radius)
	end,
})

And I fired the following command:
/listobjects 0,-1810,0 100
/listobjects 0,-28960,0 100

And what do you think?

Mine result is 0 objects there.

There are no objects!

Waiting for next error....

I've written the following code and added to the end of mods/MISC/mcl_commands/init.lua: ```lua local function list_objects(p, r) minetest.chat_send_all('performing list_objects '..minetest.pos_to_string(p)..' '..tostring(r)) local ol = minetest.get_objects_inside_radius(p or {x=0,y=0,z=0}, r or 32767) minetest.chat_send_all('list_objects result: '..#ol.." object(s)") for n, obj in ipairs(ol) do local s = "#"..tostring(n)..":" if obj == nil then s = s.." nil" else local pos = obj:get_pos() if pos then s = s.." "..minetest.pos_to_string(pos,1) end local hp = obj:get_hp() if hp then s = s.." hp="..tostring(hp) end local ent = obj:get_luaentity() if ent then s = s.." entity" if ent.name then s = s..".name="..ent.name end if ent.itemstring then s = s.." .itemstring="..ent.itemstring end if ent.age then s = s.." .age="..tostring(ent.age) end if ent._removed then s = s.." _removed" end if ent._insta_collect then s = s.." _insta_collect" end if ent.physical_state then s = s.." physical_state" end if ent._magnet_timer then s = s.." ._magnet_timer="..tostring(ent._magnet_timer) end if ent._cmi_is_mob then s = s.." _cmi_is_mob" end end if obj:is_player() then s=s.." player" local playername = obj:get_player_name() if playername then s=s..".name="..playername end end end minetest.log("warning", "[objlst] "..s) end end minetest.register_chatcommand("listobjects", { params = S("[[<pos>] <radius>]"), description = S("Print objects to log file"), privs = {server=true}, func = function(name, params) local pos, radius = {x=0,y=0,z=0}, 32767 local P, i = {}, 0 for str in string.gmatch(params, "([^ ]+)") do i = i + 1 P[i] = str end if i > 2 then return false, S("Error: Too many parameters!") end if i > 0 then radius = tonumber(P[i]) end if i == 2 then pos = minetest.string_to_pos(P[1]) end if not radius then return false, S("Error: Incorrect radius value") end if not pos then return false, S("Error: Wrong position") end list_objects(pos, radius) end, }) ``` And I fired the following command: ~~```/listobjects 0,-1810,0 100```~~ **```/listobjects 0,-28960,0 100```** And what do you think? Mine result is 0 objects there. There are no objects! Waiting for next error....
Author
Contributor

Looks weird for me:
image

Looks weird for me: ![image](/attachments/c1356b7c-dd4a-4e45-ae76-f97c32f64b66)
267 KiB
Author
Contributor

Even if it is a block number not a position:
image

~~Even if~~ **it is a block number not a position:** ![image](/attachments/b5bc5b39-c674-4015-bb08-0db1aec8f9e7)
Author
Contributor

Seems to work pretty correct with large radius values:
image

So the question has no answer for me still

Seems to work pretty correct with large radius values: ![image](/attachments/fc1ba21c-8b03-4ea4-b6bc-9e011554f726) So the question has no answer for me still
137 KiB

Uhm, this is pretty easy. Remember it is a MapBlock position (multiply by 16 to get node position). And remember that the nether is at -29000 and the end is at -27000

Uhm, this is pretty easy. Remember it is a MapBlock position (multiply by 16 to get node position). And remember that the nether is at -29000 and the end is at -27000
Author
Contributor

It isn't easy for me.
This error never happened before.
What can it be now?
My suggestion is when a mob teleports to Nether, Nether area becomes active for short time interval. But as there are no player - new mobs shouldn't spawn.
Why it's attempting to store id 0 to block (-1,-1814,0) if there are no players?
I shall check many things if they aren't broken after latest changes. E. g. lua entities (at least some of them) should pass the portals

It isn't easy for me. This error never happened before. What can it be now? My suggestion is when a mob teleports to Nether, Nether area becomes active for short time interval. But as there are no player - new mobs shouldn't spawn. Why it's attempting to store id 0 to block (-1,-1814,0) if there are no players? I shall check many things if they aren't broken after latest changes. E. g. lua entities (at least some of them) should pass the portals
kay27 reopened this issue 2021-01-08 15:31:02 +01:00
kay27 changed title from Mob falls? to Mobs seem to be over limit in inactive areas (?) 2021-01-08 15:33:31 +01:00
Wuzzy added the
mobs
bug
labels 2021-01-09 13:24:12 +01:00

However, this is not a MineClone2 issue. Its some minetest weirdness that happens with every subgame.

However, this is not a MineClone2 issue. Its some minetest weirdness that happens with every subgame.

Can this be closed?

Can this be closed?
kay27 self-assigned this 2021-01-17 19:35:21 +01:00
Author
Contributor

Not sure. 312 objects in block is huge amount! Why my object listing script never showed such numbers even if I try to iterate objects from all over the world? If it is common for minetest, I'd like to check it myself. So I better assign to myself, but if you know some related issue in minetest issue tracker - feel free to close with adding this reference.

Not sure. 312 objects in block is huge amount! Why my object listing script never showed such numbers even if I try to iterate objects from all over the world? If it is common for minetest, I'd like to check it myself. So I better assign to myself, but if you know some related issue in minetest issue tracker - feel free to close with adding this reference.
Author
Contributor

i suspect xp orbs

i suspect xp orbs
Contributor

That's quite possible, considering it happened after the XP was introduced. Mobs should only drop XP orbs when they're killed by player, like in Minecraft.

That's quite possible, considering it happened after the XP was introduced. Mobs should only drop XP orbs when they're killed by player, like in Minecraft.
kay27 closed this issue 2021-01-27 13:11:48 +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#978
No description provided.