We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.
I was able to fix this, however it is unclear what exactly the problem was. It may be related to moving/renaming of the GameInstance or GameMode.
Steps I did which may have helped to resolved this:
Avoiding GameInstance Dispatchers, calling GameMode Gamesparks connect function directly.
Setting the Connect function to run only on the server, even though this should be per default I assume since GameMode only runs on the server?
Added the Gamesparks function IsAuthenticated inbefore the GamesparkAuthenticationRequest node.
Connecting to the server once the “MainMenu” has loaded entirely.
Re-renaming and moving the GameInstance and GameMode, updating GameEngine.ini and Project Settings MapModes.
Re-added the Gamesparkas component, added MessageListener.
Changed a couple of delays on first order events.
Also tracked the issue down via Visual Studio:
This was the result from the debugger:
Exception thrown: read access violation.
this->**m_GSPlatform** was nullptr. occurred
Exception thrown: read access violation.
this->m_GSPlatform was nullptr.
C++
void GameSparks::Core::GS::DebugLog(const gsstl::string& message)
{
GS_CODE_TIMING_ASSERT();
m_GSPlatform->DebugMsg(message);
}
However, I re-added the GameInstance to share login data once the player switches the level, still working now. This problem might have been resolved when removing/readding the Gamesparks component or when renaming the GameInstance or GameMode.
268947-
So this problem happens when you try to connect with credentials, and provided credentials are invalid. This is a Gamespark issue, the Connect node should just output an error (not crash the editor).
This can be confusing, since when you login through a login/lobby map, then switch the map and gamemode, everything is fine (since authentication is cached per default). However, if you load the game map directly without at least one prior login/authentication, AccessViolation-crash happens, also happens after some time once the GS server discards cached authentications.
So while the built will require login through the lobby at first it is unclear how to exactly implement a login screen popup once authentication expired, if the player has to for instance reconnect. Maybe a check on credential strings if not empty, or store credentials inside the playerstate.