- Newest
- Most votes
- Most comments
I do the same thing you just described, so I believe that what you're doing is fine, especially considering your game is shutting down cleanly. Here's the code just to make sure we're on the same page:
auto TerminateGameSessionOutcome = Aws::GameLift::Server::TerminateGameSession();
if (TerminateGameSessionOutcome.IsSuccess()) {
auto ProcessEndingOutcome = Aws::GameLift::Server::ProcessEnding();
if (ProcessEndingOutcome.IsSuccess())
{
FGenericPlatformMisc::RequestExit(false);
}
}
This is a longshot, but what does your OnProcessTerminate
Lambda function that you pass to Aws::GameLift::Server::ProcessParameters
, which is passed to Aws::GameLift::Server::ProcessReady
look like? Perhaps something in that function is causing that error message?
Hey @REDACTEDUSER
Yep we are on the same page, however, I was calling TerminateGameSession and ProcessEnding through the gameLiftSdkModule instance rather than statically like you are doing. I tried calling them statically though just to test and got the same error message.
As for the OnProcessTerminate
function, I haven't touched the bind from the standard code that aws advised when adding GameLift here
Hmmmm, in that case, are you able to test your game locally and check if the exit code is still -1073740940? Because usually if it was a clean shutdown, then the exit code would be 0.
Unfortunately the connection logic is integrated with Flexmatch at this time, whose API is not exposed to gamelift local. So we have not be using gamelift local at all and might need to make some dev-only logic to work with it. Its a good idea though, might have to bite the bullet.
I'm also using a custom child class of FGameLiftServerSDKModule so maybe that is causing an issue. Switching back to the standard FGameLiftServerSDKModule to test it now.
Ended up getting GameLift local working for at least the server (no client connections) and found that the server wasn't exiting cleanly. One of the plugins was trying to free memory that had already been freed. Now resolved and I don't get the error from GameLift anymore. Thanks @REDACTEDUSER
Relevant content
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago