Are there some new Clients NOT sending playername ?

Post Reply
Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Are there some new Clients NOT sending playername ?

by Festus1965 » Post

Server Asia Thailand : still 5.3.0-dev

player : several, I have no proof about their client, but

[mod] better hud
in function "function hud.change_item(player, name, def)" (line 122)
following if line 123-125 ...

Code: Select all

if not player or not player:is_player() or not name or not def then
		throw_error("Not enough parameters given to change HUD item")
		return false
throw out "Not enough parameters given to change HUD item" still at to gamer login (without crash)

This happen at 3 gamer now, one I had to ban as he crashed the server then every login, with also this warning.

So WHAT values of the "player", "player:is_player" or/and "not name" and "not def" might trigger the if to true ... as I never saw this warning before

gamer logins are:
with crash : Pro1234 (before stopped by no_guests), also as GeeQ (crashing) or GGgaming
no crash: obs
--> as the names itself are "normal"
Last edited by Festus1965 on Mon Aug 03, 2020 13:40, edited 3 times in total.
Minetest has no future

User avatar
Hybrid Dog
Member
Posts: 2771
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: please explain the reason getting in this (lua)if ...

by Hybrid Dog » Post

Where can I find the better hud mod?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: please explain the reason getting in this (lua)if ...

by Festus1965 » Post

is was just weeks ago still at BlockMan ... no only at my collection, I set links in first post

Code: Select all

not player or not player:is_player() or not name or not def
so far, if
* player == empty / nil
* player:is_player() == empty / nil
* name == empty / nil
* def ==

hud.change_item called in
* buildin.lua (60 damage
with "hud.change_item(player, "health", {number = player:get_hp()})"
* buildin.lua (83) air
with "hud.change_item(player, "air", {number = air * 2})"
so far ...
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: please explain the reason getting in this (lua)if ...

by Festus1965 » Post

now same mod another crash, again from gamer cause this error message above, but
failure wrote:ServerError: AsyncErr: environment_Step: Runtime error from mod 'hud' in callback environment_Step(): /home/thomas/.minetest/mods/hud_hunger/hud/builtin.lua:80: attempt to compare number with nil

Code: Select all

					local air = player:get_breath()
					if air > 10 then (<== line 80 here)
						air = 0
					end
and so far I see there are clints outside they cover their game name so far I can see this ... as failure:
technic wrote:ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'technic' in callback on_leaveplayer(): Invalid position (expected table got nil).
xdecor/chess wrote:ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'xdecor' in callback nodemeta_inventory_AllowMove(): /home/thomas/.minetest/mods/xdecor/src/chess.lua:5: attempt to perform arithmetic on local 'idx' (a nil value)
showbones wrote:ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'showbones' in callback on_leaveplayer(): /home/thomas/.minetest/mods/showbones/init.lua:269: attempt to index a nil value

Code: Select all

showbones_temp[player_name]["hud"] = nil
playeranim wrote:ServerError: AsyncErr: environment_Step: Runtime error from mod 'playeranim' in callback environment_Step(): /home/thomas/.minetest/mods/playeranim/init.lua:73: attempt to index a nil value

Code: Select all

return self[player].yaw_history -- Return mutable reference
Just sine 5 days ? - many happen like this ,,, and this seam to be some new client ... whatever it is doing

so far I see the error/warning depends on player_name !

as admin, mods are still in with 5.2.0-win64, I am in with 5.3.0-linux, and kids are in with either 5.2.0 or 5.3.0-win32/64 with I know the source and NOTHING happen = no warning or crash
Minetest has no future

User avatar
Hybrid Dog
Member
Posts: 2771
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Are there some new Clients NOT sending playername ?

by Hybrid Dog » Post

As far as I know, the player name should always be a string.
Do you have longer backtraces of the crash messages?

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Are there some new Clients NOT sending playername ?

by rubenwardy » Post

Name there is the name of the HUD element, not the player
Try logging which of those conditions fails

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

rubenwardy wrote:
Mon Aug 03, 2020 17:49
Try logging which of those conditions fails
should have done first ... when I see the answers ... diy

Code: Select all

hud.change_item(player, name, def)
	-- player: player object
	-- name: statbar name
	-- def: table containing new values
	-- currently supported: number, text and offset
now added after that error a line

Code: Select all

throw_error("Not enough parameters given to change HUD item")
throw_error("param: " .. player .. " : " player:is_player .. " : " .. name .. " : " .. def )
not active yet
Minetest has no future

User avatar
rubenwardy
Moderator
Posts: 6289
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: Are there some new Clients NOT sending playername ?

by rubenwardy » Post

That's not valid code, it contains multiple syntax errors. You want:

Code: Select all

throw_error("param: " .. dump(player ~= nil) .. " : " .. dump(player:is_player()) .. " : " .. dump(name) .. " : " .. def)
[code]

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

couldn't test it yet ... just another crash again with that nil value on a mod working fine since 3 years

a new gamer from Canada ...
crash wrote:2020-08-04 11:54:45: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'balloon' in callback luaentity_Step(): /home/thomas/.minetest/mods/balloon/init.lua:157: attempt to perform arithmetic on a nil value
2020-08-04 11:54:45: ERROR[Main]: stack traceback:
2020-08-04 11:54:45: ERROR[Main]: /home/thomas/.minetest/mods/balloon/init.lua:157: in function </home/thomas/.minetest/mods/balloon/init.lua:150>
at code

Code: Select all

			local yaw = self.driver:get_look_yaw() - math.pi / 2
that yaw we had somewhere else also
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

rubenwardy wrote:
Mon Aug 03, 2020 22:14
That's not valid code, it contains multiple syntax errors. You want:
yeah, but maybe should have told that only one error works ?
I got the first line still active message, but after your solution - nothing

Code: Select all

throw_error("Not enough parameters given to change HUD item")
throw_error("param: " .. dump(player ~= nil) .. " : " .. dump(player:is_player()) .. " : " .. dump(name) .. " : " .. def)
just had a crash again, with only the Message "Not enough parameters given to change HUD item

Now I merged both in one call,
but before I try to get it as message --> chat,
after also as minetest.log
and then the merged error ...

but that player-IP is banned 90 days, as I want to go for sleep ...
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

still no responce from that part in hud, but a gamer

"Golden_wolf" just before 1 am joined and send chat "helo1" forced also
crash wrote:2020-08-05 00:58:22: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback on_chat_message(): String too long
2020-08-05 00:58:22: ERROR[Main]: stack traceback:
2020-08-05 00:58:22: ERROR[Main]: [C]: in function 'chat_send_player'
2020-08-05 00:58:22: ERROR[Main]: /usr/local/share/minetest/builtin/game/chat.lua:71: in function </usr/local/share/minetest/builtin/game/chat.lua:48>
2020-08-05 00:58:22: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
getting confusing ... as I see later shanish reported that

Code: Select all

/list_areas
is his thinking of the crash reason
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

to make sure no other option is wrong:

after stopping migrate to 5.3.0 I reinstalled the used and until then very stable 5.3.0-dev... as before

so
* which version of minetest_game belong to it ? guess 5.2.0
* how to check inside /usr/local/share/minetest/games/ what version is there in ? how to recognize to which version the file belong?

also as of MAYBE of my videos providing evidence of some griefer, cheater, violencer maybe they got banned (they are of that server since more than 40 days) and are ... hmmm , never know. I have seen this kind of reaction on my server near every week, angry and fighting back ...

I also keep in touch with the idea about 5.3.0 ... there are too much hard changes ... and we never have full proof about effects on our servers.
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

After I thought already the sure copy of 5.2.0 mtg might have helped ...
crash wrote:2020-08-06 16:52:24: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'hud' in callback environment_Step(): /home/thomas/.minetest/mods/hud_hunger/hud/api.lua:127: attempt to concatenate local 'def' (a table value)
2020-08-06 16:52:24: ERROR[Main]: stack traceback:
2020-08-06 16:52:24: ERROR[Main]: /home/thomas/.minetest/mods/hud_hunger/hud/api.lua:127: in function 'change_item'
2020-08-06 16:52:24: ERROR[Main]: /home/thomas/.minetest/mods/hud_hunger/hud/builtin.lua:60: in function 'func'
2020-08-06 16:52:24: ERROR[Main]: /home/thomas/.minetest/mods/hud_hunger/hud/functions.lua:27: in function 'func'
2020-08-06 16:52:24: ERROR[Main]: /usr/local/share/minetest/builtin/common/after.lua:20: in function 'globalstep'
2020-08-06 16:52:24: ERROR[Main]: .../thomas/.minetest/mods/monitoring/builtin/globalstep.lua:31: in function 'protected_call'
2020-08-06 16:52:24: ERROR[Main]: .../thomas/.minetest/mods/monitoring/builtin/globalstep.lua:30: in function <.../thomas/.minetest/mods/monitoring/builtin/globalstep.lua:21>
2020-08-06 16:52:24: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:429: in function </usr/local/share/minetest/builtin/game/register.lua:413>
2020-08-06 16:52:24: ERROR[Main]: stack traceback:
line 127: as it was ...

Code: Select all

	minetest.log("error", "[mod] hud : param: " .. dump(player ~= nil) .. " : " .. dump(player:is_player()) .. " : " .. dump(name) .. " : " .. def)
= I didn't get any output or a log line
happen when a gamer had re-log nearby same time just his times out shown, a gamer where there was no problem before ...
couldn't ask him yet what he did different

added: after a bit reading : def is a table
* the if "not def" seam not to be a problem
* changed the error writing (delete var (tab) def for now, as this is a problem at all, not let us see the other 3 var ...) - in chat, log and error ... restarted again
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

just gamer adfeg back in
terminal wrote:2020-08-06 18:40:07: ERROR[Server]: [mod] hud : param: true : false : "hunger" :
2020-08-06 18:40:07: ERROR[Server]: Better HUD[error]: Not enough parameters given to change HUD item :: param: true : false : "hunger" :
as of

Code: Select all

throw_error("Not enough parameters given to change HUD item :: param: " .. dump(player ~= nil) .. " : " .. dump(player:is_player()) .. " : " .. dump(name) .. " : " )
(but also chat message and minetest.log worked now)
* dump(player ~= nil) = true
* dump(player:is_player()) = false
* dump(name) = "hunger"
* def (unknown) but a table !
= got one jump into if reason

Code: Select all

if not player or not player:is_player() or not name or not def then
so far ...
added:
as of page dev.minetest.net/Player

Code: Select all

is_player() - returns true for players, false otherwise 
so why sometimes only the warning, and sometime also crash ?

so, seam to be my question about clients ... a player logged in but not there if trust is_player ... ?
How can that be, the player is there, logged in, I see him on terminal, even message at login, and playing even before (in this case), but the main basic quest is_player tells false ?

later adfeg answer : Windows, "someone download it for him", version 5.1.1
agreed to tell same person (had no time now) to look for minetest.net version 5.3.0 ... with 2 days hopr to change
Last edited by Festus1965 on Thu Aug 06, 2020 14:19, edited 1 time in total.
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

argh ... quoted instead of edit
Minetest has no future

User avatar
Krock
Developer
Posts: 4571
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: Are there some new Clients NOT sending playername ?

by Krock » Post

I'm pretty sure this issue revealed due to the recent ObjectRef lifecycle changes (5.3.0-dev). Objects that are accessed after their death/logout will return no value (simplified: "nil"). This applies to "minetest.after" callbacks and to code executed after "obj:remove()".

Please check whether the object is still valid if you're accessing it outside its originating callback.
For players: if not player:is_player() then return end
For all entities: if not obj:get_pos() then return end
There's no function (yet?) to check whether the object is valid, but it is already requested.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Hybrid Dog
Member
Posts: 2771
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: Are there some new Clients NOT sending playername ?

by Hybrid Dog » Post

I assume the player existence check is missing in the function passed to minetest.after in hud.player_event:
http://gitea.minetest.one/Server_Asia_T ... ns.lua#L23

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

so reading that, options:
* 1: go back to 5.2.0 release,
... as 5.3.0 crash server as some existing building (deployer opposite of node breaker) . guessing, I just get the mapblock and this is full of ...

* 2. As of the player IS logged in, but mostly happen during login (even without a quit before) the true is_player is missing, so there's no solution as hud want to start and do ... what fail often as of that false

* 3. what is the difference between existence check and is_player - player is logging in, sure, but not recognized, the check will just tell - he isn't existing, and then what ? kick ?

as possible I go for option 1 = 5.2.0 - will wait 24h to see if we get better options or solutions.

but it is not logic, as I run this 5.3.0-dev version since very long time, even before 5.3.0 was released and I never had this problem before. This is why I am so confused as this started just about 2 weeks before.

The changes from 5.3.0 are getting similar to 5.0.0 from 4.17.1 and maybe I will just freeze my server with 5.2.0 then ... when I see how much 0.4.x are still running, it is the question for WHAT ARE we changing things like protocols when now server even use all of them ... what the updates and changes are WORTH then ?
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

Server is back to Version 5.2.0 - will see if this problem is gone or will happen still - may take a week to be sure
Minetest has no future

Festus1965
Member
Posts: 1435
Joined: Sun Jan 03, 2016 11:58
In-game: bye bye

Re: Are there some new Clients NOT sending playername ?

by Festus1965 » Post

Event happened again, but without crash ...

player "Antares"
78.142.71.x (oja.at GmbH, Austria, Wien, Vienne)
smash a "param: true : false : 'health' : ..." print to terminal and ...
logged in, was in ... no crash - no time to ask about client ...
Minetest has no future

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests