Dedicated server crash with "Windows GetLastError". Windows event viewer detail: KERNELBASE.dll

Hello everybody,

I’m currently working on an online multiplayer game using AWS GameLift. Everything worked fine until I added a SetTimer in a GameMode GameLift callback (OnStartGameSession).

void AgmodeDM::OnStartGameSession_GameLift(Aws::GameLift::Server::Model::GameSession gameSession) {
#if WITH_GAMELIFT FString Json = gameSession.GetMatchmakerData();
TSharedPtr<FJsonObject> JsonObject;
TSharedRef<TJsonReader<>> Reader = TJsonReaderFactory<>::Create(Json);

if (FJsonSerializer::Deserialize(Reader, JsonObject) && JsonObject->HasField("teams")) {
  [INDENT=2]const TArray<TSharedPtr<FJsonValue>> Arr_Teams = JsonObject->GetArrayField("teams");

for (int i = 0; i < Arr_Teams.Num(); i++) {[/INDENT]
  [INDENT=3]const TSharedPtr<FJsonObject> TeamJsonObject = Arr_Teams*->AsObject();
const TArray<TSharedPtr<FJsonValue>> Arr_Players = TeamJsonObject->GetArrayField("players");
for (int j = 0; j < Arr_Players.Num(); j++) {[/INDENT]

// Line below cause the crash

You’ll find below all the things I tried/found to remove the error:

  1. The line causing the crash execute properly in the GameMode begin play function (within or whithout WITH_GAMELIFT)
  2. I tried to recompile everything without success
  3. I copied/pasted the .pdb to dedicated server to add some stack trace in the log, but sadly nothing more in it.

There’s no so much resources on this kind of error thus I decided to open a post here to find some help :slight_smile: