Gamesparks Access Violation on AuthenticationRequest
Using 4.21.2, since upgrading from 4.21.1 my Gamesparks plugin is crashing with an Access Violation error:
The plugin has been compiled from the latest GS repository version, https://bitbucket.org/gamesparks/gamesparks-cpp-unreal/downloads also https://docs.gamesparks.com/getting-started/creating-a-game/unreal-setup.html This happens when the Gamesparks AuthenticationRequest node is called from a widget, calling GameMode or a GameInstance Dispatcher. I tried with different clinet/server, no replication settings, without success. Prior to upgrading it was working.
Any pointers would be great, thanks.
asked Feb 18 '19 at 02:22 PM in Bug Reports
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:
Also tracked the issue down via Visual Studio:
This was the result from the debugger:
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.
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here