Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayerList bug makes players invisible. #4082

Open
BillSchumacher opened this issue Dec 2, 2017 · 5 comments
Open

PlayerList bug makes players invisible. #4082

BillSchumacher opened this issue Dec 2, 2017 · 5 comments

Comments

@BillSchumacher
Copy link

Client version: 1.12.2
Server OS: Windows/Linux/macOS/BSD/...
Commit id: 0dd172b (Found at the top of the server's console output)

Expected behavior

Connected players should see new players.
All players should appear in player list and be visible

Actual behavior

Only new players see connected players.
One player appears in player list.

Steps to reproduce the behavior

Compile and run. Connect two clients.

Working on it, will submit PR when I got it figured out.

@BillSchumacher
Copy link
Author

Update

On Cuberite players had changed worlds a few times and teleported, I get different output from a fresh install.

Using pyCraft I have verified that connected clients do not receive any "player list item" packets when another user connects after failure condition is reached.

I also tested with a fresh spigot server and a fresh cuberite server.

Logs (SpigotMC):

Connected

1512198818.81 0x23 JoinGamePacket {'entity_id': 651, 'reduced_debug_info': False, 'difficulty': 1, 'game_mode': 0, 'max_players': 20, 'level_type': u'default', 'dimension': 0}
Position: 1
Data: {"extra":[{"color":"yellow","text":"Connect_Player joined the game"}],"text":""}

(u'Connected_Player', 0, 0, None)
('list action: ', 0)
1512198818.81 0x2E PlayerListItemPacket

(u'Connected_Player', 0, 0, None)
('list action: ', 0)
1512198818.81 0x2E PlayerListItemPacket

1512198819.21 0x2F PlayerPositionAndLookPacket {'teleport_id': 1, 'yaw': 2.7448678016662598, 'flags': 0, 'pitch': 0.0, 'y': 64.0, 'x': 240.5, 'z': 230.5}

('list action: ', 1)
1512198827.86 0x2E PlayerListItemPacket

('list action: ', 1)
1512198827.86 0x2E PlayerListItemPacket

Position: 1
Data: {"extra":[{"color":"yellow","text":"New_Player joined the game"}],"text":""}
(u'New_Player', 0, 0, None)
('list action: ', 0)
1512198827.86 0x2E PlayerListItemPacket

('list action: ', 4)
1512198833.49 0x2E PlayerListItemPacket
Position: 1
Data: {"extra":[{"color":"yellow","text":"New_Player left the game"}],"text":""}

('list action: ', 2)
1512198834.28 0x2E PlayerListItemPacket

New Player

1512198827.84 0x23 JoinGamePacket {'entity_id': 720, 'reduced_debug_info': False, 'difficulty': 1, 'game_mode': 0, 'max_players': 20, 'level_type': u'default', 'dimension': 0}
Position: 1
Data: {"extra":[{"color":"yellow","text":"New_Player joined the game"}],"text":""}

(u'Connected_Player', 0, 141, None)
('list action: ', 0)
1512198827.84 0x2E PlayerListItemPacket

(u'New_Player', 0, 0, None)
('list action: ', 0)
1512198827.84 0x2E PlayerListItemPacket

(u'New_Player', 0, 0, None)
('list action: ', 0)
1512198827.84 0x2E PlayerListItemPacket

1512198828.5 0x2F PlayerPositionAndLookPacket {'teleport_id': 1, 'yaw': -35.718074798583984, 'flags': 0, 'pitch': 5.100000381469727, 'y': 64.0, 'x': 251.5, 'z': 242.5}
^CBye!

Logs (Cuberite)

Connected

Position: 0
Data: {"extra":[{"text":"§6Welcome to the Cuberite test server!"}],"text":""}

Position: 0
Data: {"extra":[{"text":"§6"},{"clickEvent":{"action":"open_url","value":"http://www.cuberite.org/"},"text":"http://www.cuberite.org/"}],"text":""}

Position: 0
Data: {"extra":[{"text":"§6Type /help for all commands"}],"text":""}

1512199499.27 0x23 JoinGamePacket {'entity_id': 45, 'reduced_debug_info': False, 'difficulty': 2, 'game_mode': 0, 'max_players': 100, 'level_type': u'default', 'dimension': 0}

(u'Connected_Player', 0, 0, None)
('list action: ', 0)
1512199499.27 0x2E PlayerListItemPacket

1512199499.27 0x2F PlayerPositionAndLookPacket {'teleport_id': 1, 'yaw': 0.0, 'flags': 0, 'pitch': 0.0, 'y': 62.0, 'x': 0.5, 'z': -15.5}

1512199499.38 0x2F PlayerPositionAndLookPacket {'teleport_id': 2, 'yaw': 0.0, 'flags': 0, 'pitch': 0.0, 'y': 62.0, 'x': 0.5, 'z': -15.5}

('list action: ', 2)
1512199500.27 0x2E PlayerListItemPacket

('list action: ', 2)
1512199501.31 0x2E PlayerListItemPacket

('list action: ', 2)
1512199502.64 0x2E PlayerListItemPacket

('list action: ', 2)
1512199504.38 0x2E PlayerListItemPacket
Position: 0
Data: {"extra":[{"text":"§e[JOIN] §fNew_Player has joined the game"}],"text":""}

(u'New_Player', 0, 0, None)
('list action: ', 0)
1512199505.25 0x2E PlayerListItemPacket

('list action: ', 2)
1512199506.16 0x2E PlayerListItemPacket

('list action: ', 2)
1512199507.07 0x2E PlayerListItemPacket

('list action: ', 2)
1512199507.88 0x2E PlayerListItemPacket

('list action: ', 2)
1512199508.83 0x2E PlayerListItemPacket

('list action: ', 2)
1512199509.57 0x2E PlayerListItemPacket

('list action: ', 2)
1512199510.41 0x2E PlayerListItemPacket

('list action: ', 2)
1512199511.2 0x2E PlayerListItemPacket
^CBye!

New Player

Position: 0
Data: {"extra":[{"text":"§6Welcome to the Cuberite test server!"}],"text":""}

Position: 0
Data: {"extra":[{"text":"§6"},{"clickEvent":{"action":"open_url","value":"http://www.cuberite.org/"},"text":"http://www.cuberite.org/"}],"text":""}

Position: 0
Data: {"extra":[{"text":"§6Type /help for all commands"}],"text":""}

1512199503.83 0x23 JoinGamePacket {'entity_id': 53, 'reduced_debug_info': False, 'difficulty': 2, 'game_mode': 0, 'max_players': 100, 'level_type': u'default', 'dimension': 0}

(u'New_Player', 0, 0, None)
('list action: ', 0)
1512199503.83 0x2E PlayerListItemPacket

(u'Connected_Player', 0, 0, None)
('list action: ', 0)
1512199503.83 0x2E PlayerListItemPacket

1512199503.83 0x2F PlayerPositionAndLookPacket {'teleport_id': 1, 'yaw': 0.0, 'flags': 0, 'pitch': 0.0, 'y': 62.0, 'x': 0.5, 'z': -15.5}

1512199503.89 0x2F PlayerPositionAndLookPacket {'teleport_id': 2, 'yaw': 0.0, 'flags': 0, 'pitch': 0.0, 'y': 62.0, 'x': 0.5, 'z': -15.5}

('list action: ', 2)
1512199504.34 0x2E PlayerListItemPacket

('list action: ', 2)
1512199504.88 0x2E PlayerListItemPacket

('list action: ', 2)
1512199505.33 0x2E PlayerListItemPacket

('list action: ', 2)
1512199505.89 0x2E PlayerListItemPacket

('list action: ', 2)
1512199506.36 0x2E PlayerListItemPacket

('list action: ', 2)
1512199506.94 0x2E PlayerListItemPacket

('list action: ', 2)
1512199507.57 0x2E PlayerListItemPacket
^CBye!

It seems like the behavior is a little off. Cuberite sends two PlayerPositionAndLook packets when a clients connected and sends ping update much more frequently(maybe because c++ is faster?).

Additionally, SpigotMC sends player list update packets when a player joins.

I meant to have the player spawn packets captured as well but am all out of time for tonight.

@mathiascode
Copy link
Member

Should be fixed now.

@mathiascode
Copy link
Member

World-change issue of invisible players should be fixed, but otherwise this issue still happens.

@tigerw
Copy link
Member

tigerw commented Mar 17, 2021

One potential issue I see is if two players are joining at the same time, both in limbo waiting to be added to a world, they won't be able to add each other to their own list via BroadcastPlayerListAddPlayer. This doesn't explain why an already connected player doesn't see the right state though.

@tigerw
Copy link
Member

tigerw commented Mar 17, 2021

I guess this means an already connected player that's doing world travel (i.e. in limbo) won't get updates from any players who connected at that moment, not sure if this is the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants