Individual Client Crashes Whenever the Round Ends. Cause Unknown

Hello, I am making a round-based game and sometimes a client crashes when the round ends, specifically when the players are respawned into the lobby. The screen freezes for the affected client, and it doesn’t happen 100% of the time. In fact, it happens around 25% of the time and is thus hard to debug. When it does crash at the end of the round, the client is frozen anyways so there is no way of finding out what happened in the debugger. Keep in mind the server is unaffected by this and other clients don’t crash as well. Is there any process I can undergo to find out the root of the problem? This has my head spinning in circles.

Using the debugger will eventually get me to find the problem but it would take ages, especially since the crash doesn’t happen every time.

It sounds like it could be a stack-overflow exception; assuming loop overkill is out of the question here.

Do you use any recursive calls when the round ends for each individual client?

This is one theory I have, I could be completely wrong here.

This crash is completely client sided. In a three player game, one of the players freeze in mid air and the other two are fine. It also doesn’t crash 100% of the time either.

To answer your question, I have almost no core recursive functions that run when the round ends. However, I have an “end of round stats” gui that is tailor made for each client, and each of those guis loop through all of the players too. I also have a table shuffle script but it never runs when the round ends so that is out of the equation.

However, it has never crashed once the “end of round” stats gui was instantiated. It occurs right when all players are respawned in the lobby. Upon the respawn process happening, some clients crash(~25%) and some are fine.

I ran a 3 player server and after 5 tries one of the clients finally crashed. This is a client window that crashed. This screenshot shows how I am confused.

This is a client that ended up crashing:

This is another one of my clients that is working just fine…:

Also note that crashes happen in live servers as well.

did you ever find the reason for this? I’m dealing with the exact same problem

  1. Use Microprofiler to find whats bugging
  2. It is probably some major memory leak

dude just use microprofiler, it is probably memory leak