Frequent Server Crashes caused by LoadCharacter Usage

This bug is extremely annoying. As a developer, it is impossible to properly utilize custom character loading because due to a unknown memory leak, when LoadCharacter is used frequently in-game, it causes massive server lag and often crashes.

My game had a spawn delay. Every time the character died, the wait time was 30 seconds before they respawned. As soon as this feature was added, our crash rates went up twofold, and we had massive complaints about lag whenever the server got above 30 players. We immediately disabled this new feature, and all the lag issues were fixed.

I have confirmed that this was caused by LoadCharacter() - without that function call the script otherwise runs fine.
There have been many bug reports about this but no response, will this ever be addressed?

9 Likes

Please provide more information to help reproduce or troubleshoot the issue.

Follow the instructions in the default New Thread box or posted here: Steps to Report a Bug

Ignoring those steps makes it significantly more difficult for us to help you.

1 Like

I would like to point out that LoadCharacter has had many performance issues and bugs in the past. Some examples:


A new bug report may still be useful as the cause may be different, anyway. I’m wondering if there’s an underlying issue with LoadCharacter that has caused all of the bugs and performance issues with it, including the one this thread is referring to.

Anyway, a proper repro and report is necessary. You should be able to amend your post to include the proper formatting. Making a repro should be really simple – just make a button that calls LoadCharacter on everyone or give the place a 30 second LoadCharacter delay, then let Roblox staff so the stress testing. Including a video of your existing place’s server crashes would help too.

1 Like

One time I respawned everyone using loadcharacter and it slows the server for quite a bit of time.

1 Like

Apologies. Still trying to find the best way to demonstrate this.

I’ll make an uncopylocked place and record what happens.

I haven’t been able to find any memory leak, but I’ve been loading a simple character on a base plate. It might have to do with something else about the character or the place, so detailed reproduce steps would help isolate that particular problem. I have seen, though, a part of LoadCharacter() that is taking too long and I’m looking at ways to help improve that.

Any context as to what part of LoadCharacter in particular is nuking performance?

Can confirm there’s new memory leak issues - sometimes the characters in our game are nude when using loadcharacter, and scripts are either duplicated/not cleaning up. Memory usage was insanely high too.

1 Like

As of today, I’m having this issue on my game (sorry, it’s paid access)

I tried reuploading the game to another place, and the bug doesn’t occur, so I’m not sure this one is easy to repro.
But, I’m still gonna try to narrow down the issue and post a repro (if possible), but I think it might be only affecting specific places.

EDIT: I fixed it in my own place but have no idea how, but I was still able to make a repro ¯\_(ツ)_/¯

@CodeWriter
Reset your character a few times, and it’ll start taking 4-6 seconds to respawn

Repro Place:

LoadCharacter Bug Repro.rbxl (12.8 KB)

Possibly Relevant Info:
Avatar Settings

Avatar Type Options: Morph to R15
Avatar Scaling Options: Player Choice
Avatar Animation Options: Player Choice
Avatar Collision Options: Inner Box
Avatar Body Type: Standard

2 Likes

Do you know if this still repros the issue? I attempted to Reset Character like around 50 times after joining that game with no change.

Same goes for Start Server + Player.

It was having issues last month; it seems to be working correctly now.

There is still some minor server lag when called from multiple clients simultaneously. We had to remove our custom respawn system again, which used LoadCharacter.

1 Like

I am having this issue right now, it seems it has still not been fixed.