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

A random player disappears from the team list #2678

Closed
Marc-Spector opened this issue Apr 23, 2022 · 16 comments · Fixed by #2867
Closed

A random player disappears from the team list #2678

Marc-Spector opened this issue Apr 23, 2022 · 16 comments · Fixed by #2867

Comments

@Marc-Spector
Copy link
Collaborator

Describe the bug
In the details of the game, a random player disappears from the team list. The number of players in the lobby does not change. There's nothing wrong with the player in the lobby.

To Reproduce
Don't know.

Log or error message
No any error messages in log file.

Expected behavior
Return the player to the team list.

Screenshots
image

OS
Windows

Client Version: 2022.4.0-alpha0

@Marc-Spector
Copy link
Collaborator Author

I found another case. Apparently, this is the common issue.
image

@Sheikah45
Copy link
Member

Check to make sure the server didn't send a game info message without that player in the game list

@Marc-Spector
Copy link
Collaborator Author

I see 2 players in the message

2022-04-23 22:24:37.484 DEBUG 14016 --- [reactor-tcp-nio-1] com.faforever.commons.lobby.FafLobbyApi  : Inbound message: {"command":"game_info","visibility":"public","password_protected":true,"uid":16870961,"title":"test","state":"open","game_type":"custom","featured_mod":"nomads","sim_mods":{"1491f3be-41f1-4427-9d84-e3524ac1051e":"All Faction T1 Engineers","65351074-D4A7-4449-B690-A3FCBE279341":"Crazyrush Anywhere","BBEFBDF1-3C21-4CD6-89EE-86EA42218C0C":"OOF ACU Death Sound"},"mapname":"scmp_009","map_file_path":"maps/scmp_009.zip","host":"Dexruus","num_players":2,"max_players":8,"launched_at":null,"rating_type":"global","rating_min":null,"rating_max":null,"enforce_rating_range":false,"teams":{"2":["Dexruus","LFS_Pazifisto"]}}

image

@Marc-Spector
Copy link
Collaborator Author

Marc-Spector commented Apr 23, 2022

It looks like I found a connection between all the cases. This is due to the underscore symbol in the name of the missing player

@Marc-Spector
Copy link
Collaborator Author

#2678 (comment) - Michael_Ice

2022-04-23 22:20:52.870 DEBUG 14016 --- [reactor-tcp-nio-1] com.faforever.commons.lobby.FafLobbyApi  : Inbound message: {"command":"game_info","visibility":"public","password_protected":false,"uid":16870861,"title":"All welcome","state":"playing","game_type":"custom","featured_mod":"faf","sim_mods":{},"mapname":"scmp_009","map_file_path":"maps/scmp_009.zip","host":"prefuzek","num_players":8,"max_players":8,"launched_at":1650741651.2251167,"rating_type":"global","rating_min":0.0,"rating_max":1500.0,"enforce_rating_range":false,"teams":{"2":["prefuzek","Holongit","Mariono","Cocodoo"],"3":["Heroinkid","Thibor","fedorafreak","Michael_Ice"]}}

#2678 (comment) - memento_MORI_

2022-04-23 22:12:10.020 DEBUG 14016 --- [reactor-tcp-nio-1] com.faforever.commons.lobby.FafLobbyApi  : Inbound message: {"command":"game_info","visibility":"public","password_protected":true,"uid":16870805,"title":"Nonteran","state":"open","game_type":"custom","featured_mod":"faf","sim_mods":{"74A9EAB2-E851-11DB-A1F1-F2C755D89593":"Supreme Commander Campaign Branch"},"mapname":"serenity_reef_5v5.v0008","map_file_path":"maps/serenity_reef_5v5.v0008.zip","host":"Nonteran","num_players":4,"max_players":10,"launched_at":null,"rating_type":"global","rating_min":null,"rating_max":null,"enforce_rating_range":false,"teams":{"1":["Nonteran","zorigan"],"2":["memento_MORI_","Nikodek"]}}

@Marc-Spector
Copy link
Collaborator Author

No player in observers - Altf4_ubivator

2022-04-23 22:37:50.465 DEBUG 14016 --- [reactor-tcp-nio-1] com.faforever.commons.lobby.FafLobbyApi  : Inbound message: {"command":"game_info","visibility":"public","password_protected":false,"uid":16870925,"title":"1.2k+ opti","state":"open","game_type":"custom","featured_mod":"faf","sim_mods":{},"mapname":"dualgap_adaptive.v0012","map_file_path":"maps/dualgap_adaptive.v0012.zip","host":"frollog","num_players":12,"max_players":12,"launched_at":null,"rating_type":"global","rating_min":1000.0,"rating_max":null,"enforce_rating_range":false,"teams":{"2":["frollog","na_dno","OldStudent","Vast","K240","BeshbarMak"],"3":["GL_HF","cZARJc","Shaktti","Jackataj","Fat_Bustard"],"-1":["Altf4_ubivator"]}}

image

@1-alex98
Copy link
Member

1-alex98 commented Aug 15, 2022

if you want to identify if this is an ui issue you could use https://github.com/JonathanGiles/scenic-view and see if the element is in the scene graph @Marc-Spector

@1-alex98
Copy link
Member

1-alex98 commented Aug 16, 2022

It is also definitely not about the length of the name
image
or maybe that is not long enough. I mean number of characters is one thing but the actual size also depends on which characters they are and _ is particularly wide

@Marc-Spector
Copy link
Collaborator Author

Okay, I'll take a look at this. There is another idea why this happened
Will the player disappear if he leaves from all chat channels? Before creating or joining the game or during the lobby.
That is, we need someone who will take on the role of a tester. And look at the result.

@Marc-Spector
Copy link
Collaborator Author

Perhaps the issue appeared after I made an overhaul of the user list in chat tab

@1-alex98
Copy link
Member

image
No underscore

@1-alex98
Copy link
Member

it is no display issue the box is actually empty
image

@1-alex98
Copy link
Member

Yes he is not in chat
image

@1-alex98 1-alex98 self-assigned this Aug 16, 2022
@Marc-Spector
Copy link
Collaborator Author

@1-alex98
Copy link
Member

Hmm ok. Well in the case of the ghost game, the player is not online at all anymore and therefore does not have an entry in the players map. Looking at the underlying code the only option for me why the "no entry in players list" can happen is if the server does not send us a PlayerInfo about the said user. Meaning the user is offline but still in a game making it a server issue.

@Marc-Spector
Copy link
Collaborator Author

Marc-Spector commented Dec 5, 2022

That's why the players do not display in the team list

@Subscribe
public void onPlayerOffline(PlayerOfflineEvent event) {
PlayerBean player = event.getPlayer();
synchronized (playersById) {
playersById.remove(player.getId());
}
synchronized (playersByName) {
playersByName.remove(player.getUsername());
}
}

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.

3 participants