Are there some new Clients NOT sending playername ?

Post Reply
User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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.

User avatar
Hybrid Dog
Member
Posts: 2761
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?

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

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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 ...

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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

User avatar
Hybrid Dog
Member
Posts: 2761
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: 6192
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

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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

User avatar
rubenwardy
Moderator
Posts: 6192
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]

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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 ...

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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

User avatar
Festus1965
Member
Posts: 1317
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Explorer Thailand
Location: Thailand - Chiang Mai (+5-6h to MEZ)
Contact:

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest