UnrealGDK icon indicating copy to clipboard operation
UnrealGDK copied to clipboard

Error when GameModeBase::PreLogin returns ErrorMessage

Open GeorgeR opened this issue 6 years ago • 0 comments

We are accepting issues and we want your feedback.


Description

When you return an ErrorMessage from GameMode::PreLogin (it's non-empty), SpatialOS doesn't account for it in SpatialReceiver::ReceiveActor where it called NetDriver->AcceptNewPlayer. AcceptNewPlayer returns null if the Error is present, as SpatialOS has an assertion at the next line that it's not null!

Expected behavior

SpatialOS should allow for errors in PreLogin (see SpatialNetDriver::AcceptNewPlayer). There appears to be a note there already referencing UNR-584?

Current behavior

Assertion failure.

Possible solution

For now just gracefully close the connection, with a note in future that the calling client should be sent the error itself.

Steps to reproduce

  1. Set the ErrorMessage in PreLogin to anything (non empty) in the shooter example.
  2. Start PIE.

Environment

4.21.1 custom spatial release branch, using release branch of GDK.

Internal ticket

UNR-584

GeorgeR avatar Mar 18 '19 13:03 GeorgeR