Game keeps disconnecting everyone with no apparent cause on certain gameservers

Issue Type: Connectivity
Impact: Very High
Frequency: Constantly
Date First Experienced: 2021-02-12 11:02:00 (-08:00)
Date Last Experienced: 2021-02-13 15:02:00 (-08:00)

Reproduction Steps:

  1. Join a server (typically the ones with the most players don’t crash, but ones with less players seem to be crash more) on Teleport to Eat People & Grow Big - Roblox
  2. Wait for a couple of minutes
  3. The gameserver will disconnect everyone

Looking at all the stats on the developer console, there seems to be nothing out of the ordinary at all, even leading up the disconnection. The only thing in common that we’ve observed amongst all the crashes, are character humanoid scale value instances being modified near the disconnection point.

Expected Behavior:

  • As a player, I expect to play the game without disconnecting, and be able to rejoin the game without being presented with an ID=17 error, or
  • As a developer, to see any kind of developer console or microprofiler statistics behaving differently leading up to the crash
    • if it’s a game script running too long, I figure it’d at least output a “game script timeout”, which it doesn’t seem to (and it seems like there’s no place in the code where this case might occur)

Actual Behavior:
In certain servers, the gameserver suddenly disconnects everyone after a couple of minutes (with no visible anomalies in developer console statistics or microprofiler dumps leading up to the disconnection event), but stays up, and continues allowing players to join, except they cannot actually connect to the gameserver, and instead end up getting presented with an ID=17 connection error.

Workaround:
There is no workaround for this problem that we’ve been able to find.

4 Likes

Turns out :LoadCharacter() was being called 100+ times, which forces a disconnection.

6 Likes

Could you post the snippet of code that caused LoadCharacter() to be called so many times? Did LoadCharacter() get called so many time before Player.CharacterAppearanceLoaded event is fired?

4 Likes

In these two server log samples (from accidentally reproducing the bug during a Studio test session), the crashes began at

2021-02-16T00:26:01.336Z,62.336159,0d2c,6
in 0.465.0.417678_20210216T002459Z_Studio_676B1_last.log.txt (35.0 KB)

and
2021-02-16T00:27:20.646Z,67.646118,3008,6
in 0.465.0.417678_20210216T002613Z_Studio_E17E4_last.log.txt (28.2 KB)

This is the actual code (lines 283 & 285 in the first screenshot were not there before, and adding these to ignore cases where player & targetPlayer are the same player, prevented the sequence of events that led to the crash):

image

image

image

image

My guess is that the LoadCharacter call in line 270 replaced the character after the CharacterRemoving hook at line 140 was installed & as a result it called the function containing line 270 again, causing it to get stuck in a loop

2 Likes

did you figure that out from the logs or did you notice what was happening from looking at your code?

4 Likes

were you able to fix this issue by updating your scripts, or did that not work?

4 Likes

Updating the scripts to fix the condition leading to the loadcharacter call loop worked :+1:

2 Likes

great, thanks for letting me know! We will still be investigating an engine fix, but I was curious if a script fix was possible

5 Likes

Hello, I am currently having the same disconnectivity issues.

I saw this bug report and pushed a hotfix today that fixed an exposed remote event that prevents clients from constantly calling LoadCharacter(), but players are still reporting constant disconnects. I want to bring this to your attention as there may still be an engine issue.

Here is the link to my bug report: Large number of player disconnections (Error 277, 279)

2 Likes

Seems to happen in everything I join, only happens when I use a VPN

2 Likes

some fixes have gone live recently, which should fix some issues with LoadCharacter() from the engine side

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.