[testserver] y_bows: HUDCHANGE packet spam #6156

Closed
opened 2024-01-31 19:43:38 +00:00 by whosit · 10 comments
Member

When I'm not holding a bow and as soon as I join the test server starts sending these packets every server step (red line is 0x4b is HUDCHANGE, green is total):
Screenshot 2024-01-31 220057

Here's our attempt to narrow this down:
2Screenshot 2024-01-31 221052

Idk what it is doing exactly, maybe removing hud? Because the packets do not contain any texture info:

image

When I'm not holding a bow and as soon as I join the test server starts sending these packets every server step (red line is `0x4b` is `HUDCHANGE`, green is total): ![Screenshot 2024-01-31 220057](/attachments/39dec614-c1b8-436b-b9ca-9fc503373eb6) Here's our attempt to narrow this down: ![2Screenshot 2024-01-31 221052](/attachments/9342fe21-c413-4185-ba4b-a0ec254c9edc) Idk what it is doing exactly, maybe removing hud? Because the packets do not contain any texture info: ![image](/attachments/cc4d8e19-44ee-45d3-86aa-6698b4011965)
whosit added the
1. kind/bug
label 2024-01-31 19:46:42 +00:00
flux was assigned by whosit 2024-01-31 19:46:48 +00:00
flux added this to the flux's TODO list project 2024-02-01 19:18:06 +00:00
flux added the
4. step/question
label 2024-02-01 19:33:09 +00:00
flux removed the
4. step/question
label 2024-02-01 19:56:26 +00:00
Member

i see, i'm able to replicate this locally now. hm. i've got no idea what's going on here, but it does seem to be y_bow's fault.

i see, i'm able to replicate this locally now. hm. i've got no idea what's going on here, but it does seem to be y_bow's fault.
Member

oh, i figured one part of it out - apparently when checking whether a HUD parameter's value had changed, i've been using == to compare tables. that fixes most of it.

however, i've got to do something to figure out loss of floating point precision:

2024-02-01 12:03:49: ACTION[Server]: [futil] [DEBUG] flux y_bows:background(17) position {
	x = 0.5,
	y = 0.34999999403954
}->{
	x = 0.5,
	y = 0.35
}
oh, i figured one part of it out - apparently when checking whether a HUD parameter's value had changed, i've been using `==` to compare tables. that fixes most of it. however, i've got to do something to figure out loss of floating point precision: ``` 2024-02-01 12:03:49: ACTION[Server]: [futil] [DEBUG] flux y_bows:background(17) position { x = 0.5, y = 0.34999999403954 }->{ x = 0.5, y = 0.35 } ```

Means, the loss would amount to 5.96045996e-9 ? Given that MT uses single blocky collision boxes for entities, there's no need to tell apart whether we shot the left or the right nostril?

Means, the loss would amount to 5.96045996e-9 ? Given that MT uses single blocky collision boxes for entities, there's no need to tell apart whether we shot the left or the right nostril?
Member

this should fix it: 9858421c84

this should fix it: https://github.com/fluxionary/minetest-futil/commit/9858421c844aca53628f0a782a29c237db73f092
Member

Means, the loss would amount to 5.96045996e-9 ? Given that MT uses single blocky collision boxes for entities, there's no need to tell apart whether we shot the left or the right nostril?

no, this is just in the HUD update manager. what's happening is that certain values that define the HUD (e.g. scale and position) are stored using 32 bit floats, whereas the values supplied by the lua code are 64 bit floats. if i try to compare the old HUD values to the new values, i need to account for the lost precision.

> Means, the loss would amount to 5.96045996e-9 ? Given that MT uses single blocky collision boxes for entities, there's no need to tell apart whether we shot the left or the right nostril? no, this is just in the HUD update manager. what's happening is that certain values that define the HUD (e.g. scale and position) are stored using 32 bit floats, whereas the values supplied by the lua code are 64 bit floats. if i try to compare the old HUD values to the new values, i need to account for the lost precision.
flux added the
4. step/ready to QA test
label 2024-02-01 21:01:23 +00:00
Author
Member

Since it's just hud, would it not make more sense to just subtract them and compare with some small enough "epsilon" value? Instead of using strings and pattern matching?

Since it's just hud, would it not make more sense to just subtract them and compare with some small enough "epsilon" value? Instead of using strings and pattern matching?
Author
Member

I think this may be related:
#5973
just not sure if I tried running wireshark at that time or not...

(seems like this spam may have been that cause of that bug...)

I think this may be related: https://gitea.your-land.de/your-land/bugtracker/issues/5973 just not sure if I tried running wireshark at that time or not... (seems like this spam may have been that cause of that bug...)
Member

yeah, i think it's probably also responsible for the arrows stuck in the air too. too many spurious packets and the client gets confused.

yeah, i think it's probably also responsible for the arrows stuck in the air too. too many spurious packets and the client gets confused.
Author
Member

image
HUDCHANGE while spamming arrows on the test server (with a pause in the middle))

![image](/attachments/9d8cc745-4ab7-480d-9f50-87ba9b2f5f1e) `HUDCHANGE` while spamming arrows on the test server (with a pause in the middle))
whosit added the
ugh/QA OK
label 2024-02-17 15:46:38 +00:00
AliasAlreadyTaken added this to the 1.1.123 milestone 2024-02-26 12:29:08 +00:00
flux added
5. result/fixed
and removed
4. step/ready to QA test
labels 2024-03-28 21:10:43 +00:00
Member

live

live
flux closed this issue 2024-03-28 21:11:20 +00:00
flux removed this from the flux's TODO list project 2024-03-30 19:16:16 +00:00
flux removed their assignment 2024-03-30 19:16:19 +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#6156
No description provided.