Flatulenator reports: Sometimes when the inventory d ... #1819

Closed
opened 2022-04-24 01:41:21 +00:00 by yourland-report · 9 comments

Flatulenator reports a bug:

Sometimes when the inventory drops, items instantly despawn and you lose them forever.

Player position:

{
	y = -13339.5,
	x = -30005.84375,
	z = -30000.8125
}

Player look:

{
	y = -0.27060043811798,
	x = -0.35673263669014,
	z = 0.89415723085403
}

Player information:

{
	min_rtt = 0.14499999582767,
	max_rtt = 1.4529999494553,
	connection_uptime = 503,
	max_jitter = 1.2799999713898,
	minor = 1,
	major = 5,
	ip_version = 6,
	formspec_version = 2,
	patch = 1,
	protocol_version = 38,
	serialization_version = 28,
	lang_code = "",
	version_string = "5.1.1",
	avg_rtt = 0.15700000524521,
	state = "Active",
	avg_jitter = 0.0059999972581863,
	min_jitter = 0
}

Player meta:

{
	fields = {
		["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}",
		played_time = "485319",
		["ocean_build.ocean_built"] = "3",
		jointime = "1648785584",
		yl_commons_player_joined = "1650764022",
		["stamina:exhaustion"] = "135.5",
		["signslib:pos"] = "(2,2,-30911)",
		digged_nodes = "76821",
		bitten = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		partychat = "party",
		yl_commons_thankyou = "8",
		yl_church = "return {[\"last_death\"] = {[\"y\"] = -13339, [\"x\"] = -30000, [\"z\"] = -30000}, [\"last_heal\"] = 1648878609, [\"last_death_portal\"] = 1650764259}",
		died = "107",
		["stamina:level"] = "13",
		punch_count = "15594",
		arenalib_infobox_arenaID = "0",
		inflicted_damage = "283596",
		crafted = "745",
		["stamina:poisoned"] = "no",
		["ocean_build.last_warning"] = "1.65061e+09",
		xp = "60225",
		placed_nodes = "6513",
		hud_state = "on",
		repellant = "0",
		yl_commons_player_created = "1648785584"
	}
}

Log identifier


[MOD] yl_report log identifier = h231qWe402bUzGMXQlUeqcbuUDwMUaS6

Profiler save:

profile-20220424T034120.json_prettyEE

Status:

# Server: version: 5.5.0-yl | game: Minetest Game | uptime: 16h 32min 33s | max lag: 3.84s | clients: Flatulenator, Lupercus, MicaelStarfire, Peace12345, Billr, daydream, annah, AliasAlreadyTaken, plod, Oakenshield, Futureismine, Ryanthegirl, Service, shanish, shanish2, paneg, pitman, flux, LeetPeet, Boot, Aleks555, Bailiff

Teleport command:

/teleport xyz -30006 -13340 -30001

Compass command:

/give_compass Construction h231qWe402bUzGMXQlUeqcbuUDwMUaS6 D2691E -30006 -13340 -30001
Flatulenator reports a bug: > Sometimes when the inventory drops, items instantly despawn and you lose them forever. Player position: ``` { y = -13339.5, x = -30005.84375, z = -30000.8125 } ``` Player look: ``` { y = -0.27060043811798, x = -0.35673263669014, z = 0.89415723085403 } ``` Player information: ``` { min_rtt = 0.14499999582767, max_rtt = 1.4529999494553, connection_uptime = 503, max_jitter = 1.2799999713898, minor = 1, major = 5, ip_version = 6, formspec_version = 2, patch = 1, protocol_version = 38, serialization_version = 28, lang_code = "", version_string = "5.1.1", avg_rtt = 0.15700000524521, state = "Active", avg_jitter = 0.0059999972581863, min_jitter = 0 } ``` Player meta: ``` { fields = { ["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}", played_time = "485319", ["ocean_build.ocean_built"] = "3", jointime = "1648785584", yl_commons_player_joined = "1650764022", ["stamina:exhaustion"] = "135.5", ["signslib:pos"] = "(2,2,-30911)", digged_nodes = "76821", bitten = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", partychat = "party", yl_commons_thankyou = "8", yl_church = "return {[\"last_death\"] = {[\"y\"] = -13339, [\"x\"] = -30000, [\"z\"] = -30000}, [\"last_heal\"] = 1648878609, [\"last_death_portal\"] = 1650764259}", died = "107", ["stamina:level"] = "13", punch_count = "15594", arenalib_infobox_arenaID = "0", inflicted_damage = "283596", crafted = "745", ["stamina:poisoned"] = "no", ["ocean_build.last_warning"] = "1.65061e+09", xp = "60225", placed_nodes = "6513", hud_state = "on", repellant = "0", yl_commons_player_created = "1648785584" } } ``` Log identifier ``` [MOD] yl_report log identifier = h231qWe402bUzGMXQlUeqcbuUDwMUaS6 ``` Profiler save: ``` profile-20220424T034120.json_prettyEE ``` Status: ``` # Server: version: 5.5.0-yl | game: Minetest Game | uptime: 16h 32min 33s | max lag: 3.84s | clients: Flatulenator, Lupercus, MicaelStarfire, Peace12345, Billr, daydream, annah, AliasAlreadyTaken, plod, Oakenshield, Futureismine, Ryanthegirl, Service, shanish, shanish2, paneg, pitman, flux, LeetPeet, Boot, Aleks555, Bailiff ``` Teleport command: ``` /teleport xyz -30006 -13340 -30001 ``` Compass command: ``` /give_compass Construction h231qWe402bUzGMXQlUeqcbuUDwMUaS6 D2691E -30006 -13340 -30001 ```
AliasAlreadyTaken was assigned by yourland-report 2022-04-24 01:41:21 +00:00
AliasAlreadyTaken added the
1. kind/bug
label 2022-04-24 04:19:40 +00:00

There is something at work that removes the items regardless of the 15 minute rule of dropped items. The stuff is a maximum of 16 so it can't run into the "can't store more than 128 entities".

I refunded the items because Flatulenator could prove he was at the very drop location 10 minutes after at most.

There is something at work that removes the items regardless of the 15 minute rule of dropped items. The stuff is a maximum of 16 so it can't run into the "can't store more than 128 entities". I refunded the items because Flatulenator could prove he was at the very drop location 10 minutes after at most.
Member

he stuff is a maximum of 16 so it can't run into the "can't store more than 128 entities".

It absolutely can if there's already 128 entities in the area, e.g. too many shops/signs/scouts etc.

> he stuff is a maximum of 16 so it can't run into the "can't store more than 128 entities". It absolutely can if there's already 128 entities in the area, e.g. too many shops/signs/scouts etc.

Only that there were next to no entities around. Is there a way to capture the on_despawn of dropped items?

Only that there were next to no entities around. Is there a way to capture the on_despawn of dropped items?
Member

Only that there were next to no entities around. Is there a way to capture the on_despawn of dropped items?

I think by overriding the get_staticdata callback, e.g.

local entity_name = "__builtin:item"
local old_get_staticdata = minetest.registered_items[entity_name].get_staticdata
minetest.override_item(entity_name, {
    get_staticdata = function(self)
        minetest.log("action", ("[builtin] preparing to unload %q dropped by %s, %s seconds ago"):format(self.itemstring, self.dropped_by or "<UNKNOWN>", self.age))
        return old_get_staticdata(self)
    end,
})
> Only that there were next to no entities around. Is there a way to capture the on_despawn of dropped items? I think by overriding the `get_staticdata` callback, e.g. ```lua local entity_name = "__builtin:item" local old_get_staticdata = minetest.registered_items[entity_name].get_staticdata minetest.override_item(entity_name, { get_staticdata = function(self) minetest.log("action", ("[builtin] preparing to unload %q dropped by %s, %s seconds ago"):format(self.itemstring, self.dropped_by or "<UNKNOWN>", self.age)) return old_get_staticdata(self) end, }) ```
Member

Though that only captures when the item is going to be unloaded. If you want to log when it's going to be removed, you have to do

local entity_name = "__builtin:item"
local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900
if time_to_live > 0 then
    local old_on_step = minetest.registered_items[entity_name].on_step
    minetest.override_item(entity_name, {
        on_step = function(self, dtime, ...)
            if self.age + dtime > time_to_live then
                minetest.log("action", ("[builtin] about to remove %q dropped by %s"):format(self.itemstring, self.dropped_by or "<UNKNOWN>"))
            end
            return old_on_step(self, dtime, ...)
        end,
    })
end
Though that only captures when the item is going to be unloaded. If you want to log when it's going to be removed, you have to do ```lua local entity_name = "__builtin:item" local time_to_live = tonumber(core.settings:get("item_entity_ttl")) or 900 if time_to_live > 0 then local old_on_step = minetest.registered_items[entity_name].on_step minetest.override_item(entity_name, { on_step = function(self, dtime, ...) if self.age + dtime > time_to_live then minetest.log("action", ("[builtin] about to remove %q dropped by %s"):format(self.itemstring, self.dropped_by or "<UNKNOWN>")) end return old_on_step(self, dtime, ...) end, }) end ```
Member

I might as well add that code to yl_commons

I might as well add that code to yl_commons
Member

Added logging code in e31543758b

Added logging code in https://gitea.your-land.de/your-land/yl_commons/commit/e31543758b327bf0385ed69a6ea7bcc67c93beba
Member

logging is live, items dropping will not happen once the bones update is live.

logging is live, items dropping will not happen once the bones update is live.
flux added the
4. step/ready to QA test
label 2022-07-02 21:04:44 +00:00
flux added this to the flux's TODO list project 2022-07-02 21:04:47 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2022-07-17 19:27:05 +00:00
flux removed this from the flux's TODO list project 2022-07-17 19:27:08 +00:00
AliasAlreadyTaken was unassigned by flux 2022-07-17 19:27:11 +00:00
Member

fix is live

fix is live
flux closed this issue 2022-07-17 19:27:14 +00:00
AliasAlreadyTaken added this to the 1.1.115 milestone 2022-08-06 18:28:20 +00: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: your-land/bugtracker#1819
No description provided.