Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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:

 Access violation - code c0000005 (first/second chance not available)
 UE4Editor_GameSparks!GameSparks::Core::GS::NewConnection() [...\projects\spacealpha\plugins\gamesparks\source\gamesparksbasesdk\src\gamesparks\gs.cpp:116]
 UE4Editor_GameSparks!GameSparks::Core::GS::Send() [...\projects\spacealpha\plugins\gamesparks\source\gamesparksbasesdk\src\gamesparks\gs.cpp:293]
 UE4Editor_GameSparks!GameSparks::Core::GSTypedRequest<GameSparks::Api::Requests::RegistrationRequest,GameSparks::Api::Responses::RegistrationResponse>::Send() [...\projects\spacealpha\plugins\gamesparks\source\gamesparksbasesdk\include\gamesparks\gstypedrequest.h:85]
 UE4Editor_GameSparks!UGSRegistrationRequest::Activate() [...\projects\spacealpha\plugins\gamesparks\source\gamesparks\private\gsapi.cpp:7181]

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.

Product Version: UE 4.21
more ▼

asked Feb 18 '19 at 02:22 PM in Bug Reports

avatar image

498 32 46 84

avatar image Jeff A ♦♦ STAFF Feb 18 '19 at 03:43 PM


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.



avatar image unit23 Feb 18 '19 at 04:32 PM

Made a fresh project, unable to reproduce the error, it is something else, still investigating.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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:

  1. Avoiding GameInstance Dispatchers, calling GameMode Gamesparks connect function directly.

  2. 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?

  3. Added the Gamesparks function IsAuthenticated inbefore the GamesparkAuthenticationRequest node.

  4. Connecting to the server once the "MainMenu" has loaded entirely.

  5. Re-renaming and moving the GameInstance and GameMode, updating GameEngine.ini and Project Settings MapModes.

  6. Re-added the Gamesparkas component, added MessageListener.

  7. 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.
 void GameSparks::Core::GS::DebugLog(const gsstl::string& 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.

alt text

auth4.jpg (312.3 kB)
more ▼

answered Feb 18 '19 at 07:49 PM

avatar image

498 32 46 84

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Mar 11 '19 at 12:26 PM

avatar image

498 32 46 84

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question