StrangeLoopGames / EcoIssues

131 stars 21 forks source link

Leaving twice ... at once #17216

Open D3nnis3n opened 4 years ago

D3nnis3n commented 4 years ago

twice Two messages triggered.

MonzUn commented 4 years ago

I've seen this happen every now and then since at least staging-1611, but possibly farther back than that. The users that have left the double messages didn't know why it could have happened either.

D3nnis3n commented 4 years ago

This happens when the user crashes instead of leaving. Can reproduce.

Daniel-Magulado commented 3 years ago

Tested on 0.9.3.1 Release-204 I can reproduce. No client crash occurring. image.png

I set up my own server running on a dedicated computer. I joined that server using my personal PC.

What I noticed is that the issue is likely more to occur if there's a poor connection between the Server and the Player. When I disconnected from the server via the Disconnect button, the server took about 30 seconds or so to show that I was disconnected. It showed twice though that I left. Another instance is that I disconnected from the server. Server did not show any form of notification that I left. After a minute, I reconnected. The server then displayed 3 notifications, 2 of those is me leaving the server and the 3rd one is me reconnecting.

Daniel-Magulado commented 3 years ago

Alright, I can confirm with build 0.9.3.1 Release-204 that this is likely to happen if the player has poor connectivity with the server.

The frequency of happening is 2/10 tries. Repro:

  1. Connect to a server with a bit high latency. Just to establish a poor connection between the server and the player.
  2. Play through a couple of hours.
  3. Disconnect.

Note:

Video: https://images.zenhubusercontent.com/47210472/67ad8489-3596-4960-84c0-08800356b6c5/vid_20210417_230245_trim.mp4

Server Log: log_210417064249.txt Player.txt

Daniel-Magulado commented 3 years ago

Okay found another repro with a 100% chance to trigger notification of a player leaving the server twice.

Repro:

  1. Player 1 Hosts a game and starts a server.
  2. Player 2 waits in the lobby for Player 1 to start up the server.
  3. Once the server is up, let Player 2 connect to the server first. Do this by connecting to the server first before Player 1 completely connects to the server.
  4. Observe, inside the game, Player 2 will have a notification that Player 1 has connected while Player 1 doesn't receive any notification that Player 2 has connected.
  5. Disconnect Player 2 and observe the Chatbox of Player 1. No notification that Player 2 left the server.
  6. Make Player 2 connect to the same server again. Player 1 will receive notification that Player 2 has Left the game twice.

Video Repro: This is an unlisted video. The Video file is too large and long. I trimmed it to the necessary parts but still too long. https://youtu.be/eX23jo8zvWY

Note the following in the video. Laptop = Player 1 (Server PC) Devqa Desktop = Player 2 - Nielzx