x

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"

Bug Report - Player State does not return name after OnLogout

4.14 is the first release of Unreal Engine where this function no longer works. Instead of printing out the name of the disconnecting player, it now prints no name at all.

alt text

The project uses steam online subsystem. This has worked flawlessly in every version since UE 4.7, what has changed? Using the same or similar function ingame works fine, before the player disconnects.

(I recently added the cast to the specific controller class, however it changed nothing.) In earlier UE4 versions this function was able to display the name of the disconnecting player. Is there a new way of doing this, or should'nt this still work like before? Im currently using 4.14.1

Im trying to find a workaround meanwhile. Thanks in advance for any assistance!

Product Version: UE 4.14
Tags:
playerstate.jpg (221.2 kB)
more ▼

asked Dec 18 '16 at 06:46 AM in Bug Reports

avatar image

MADHOUSE
375 22 37 58

avatar image Sean L ♦♦ STAFF Dec 22 '16 at 04:21 PM

Hey MADHOUSE,

Are you receiving any warnings or errors after exiting your play session?

On my end, I'm getting a pending kill error for the Player State, and I was wondering if you're experiencing the same. This could explain why you're not getting your Player Name from the Player State.

avatar image MADHOUSE Dec 22 '16 at 09:40 PM

Greetings! Ive just finnished testing that after building a development build to access logs.

We seem to get the same errors:

"[2016.12.22-21.34.11:135][290]LogScript:Warning: Attempted to access PlayerState_1 via property PlayerState, but PlayerState_1 is pending kill

[2016.12.22-21.34.11:135][290]LogScript:Warning: Script call stack: Function /Game/Blueprints/MyGame.MyGame_C:K2_OnLogout Function /Game/Blueprints/MyGame.MyGame_C:ExecuteUbergraph_MyGame

[2016.12.22-21.34.11:231][296]LogScript:Warning: Attempted to access MyPlayerController_C_1 via property K2Node_Event_ExitingController, but MyPlayerController_C_1 is pending kill "

Thanks for your assistance!

avatar image MADHOUSE Dec 22 '16 at 09:52 PM

(From the log it seems that the player controller from the ExitingController output on the OnLogout node is not accessible at all.)

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

1 answer: sort voted first

Hey MADHOUSE,

I've discovered the cause of this issue. It seems that in GameMode.cpp, in the AGameMode::Logout function, the Super::Logout call was being executed at the end of the function instead of at the start.

So if you have a source build, which I would definitely recommend, what you can do is go ahead and make the change in GameMode.cpp around line 126:

Move Super::Logout(Exiting); to the top of the function and compile your engine. This should resolve the issue.

Let me know if that helps.

more ▼

answered Dec 23 '16 at 03:14 PM

avatar image

Sean L ♦♦ STAFF
43.8k 485 152 440

avatar image MADHOUSE Dec 24 '16 at 01:47 AM

Ah yes, im using a source version of the engine. This fix seems to work excellently, the controller can now be accessed.

alt text

Thank you very much for the quick solution!

Have a great weekend!

(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