Crash when calling APlayerController::SetPause

Access violation - code c0000005 (first/second not available)

WorldAtWar!APlayerController::SetPause() + 90 bytes [d:\ue4-release\unrealengine\engine\source\runtime\engine\private\playercontroller.cpp:1602]

I was logged into a server and the round ended. I pressed Escape to go back to the main menu and got this crash. Apparently, the client turned into a NM_Standalone and doesn’t have a valid AuthGameMode at this point. So it crashed here:

			// Pause gamepad rumbling too if needed
			bResult = GameMode->SetPause(this, CanUnpauseDelegate);

I recommend checking if the GameMode is valid after calling GetAuthGameMode and return false if it is not valid.

Hi ,

Would you be able to provide a little more information about this issue?

  • What version of the Engine are you using?
  • Was the server still active when the crash happened on your client?
  • Is this something that happens every time you try to return to the main menu?
  • Would you be able to provide the full callstack and project log?

Hi , we are using 4.6.1-release and for some reason we lost connection with the server and the game went into the stand-alone game mode, so the server was still active but the connection was not. Yes it has occurred everytime we have lost connection and it occurs in exactly the same place. This is currently the only crash that we cannot control. But it never occurs otherwise. Our game mode code called SetPause and it crashes as stated above. A full stack trace will give you no additional information than what I have already provided. I’m guessing the problem is because we had no valid AuthGameMode and once the connection to the server was lost the engine switches the client to StandAlone but the game mode is still invalid because it was never initialized as a standalone game. So either checking if GameMode is valid here or fixing the client’s gamemode when switching from NM_Client to StandAlone is probably the best option.

The next time this occurs I can try and give you more information but I doubt it will help.

Hey -

We have not heard back from you in some time, hopefully that means that your issue has not re-occured. I am marking this question as answered for tracking purposes only. If this problem has persisted into 4.7, please let us know with any additional information and we will begin investigating again.

Thank You

Eric Ketchum

This problem is still common.