[4.8 preview 2] Player controller object isn't spawning in standalone?

I’ve put up print strings on blueprints nodes trying to find out why I can’t see my scene correctly like I can in PIE testing (“New Editor Window/Selected Viewport”) and discovered that even on the ‘begin play’ node of player controller it doesn’t show printed string, so it looks like player controller isn’t being made at all?

Hey SwiftIllusion,

I just tested this in 4.8p2, and couldn’t reproduce what you’ve described. To test, I simply created a new Third Person template project, created a PlayerController BP, and added PlayerController to GameMode being used. Inside PlayerController, I did a Print String on Begin Play. print occurred both in PIE and in Standalone.

Are there more steps I’m missing to reproduce this? Does this happen in a new project for you as well as your current project? Did same setup work for you in 4.7.6? Any other details that can help us reproduce this would be greatly appreciated. Thanks!

Never had this issue in 4.7.
I don’t know how it’s happening, but looking into it more after trying it with other projects converted to 4.8 and having them work, I discovered somehow something in player controller breaks its functionality with Standalone.
Creating a new player controller and setting gamemode to use that, just adding a print string to its begin play, it works. However after copying and pasting my nodes from original player controller to new one, it ends up again being broken in standalone but working fine in PIE.
Here’s a screenshot of nodes (please forgive how messy it is right now) - http://i.gyazo.com/d153df3ad2ea4e1ac1d9c76d071e1b89.png http://i.gyazo.com/49b68451d58704304d7ee757427e5308.png
Some part of that seems to break its functionality? (It might be related to another reported bug/now known issue - “UE-15155 After upgrading a project from 4.7 to 4.8 and compiling a blueprint that casts to and pulls a variable from a widget will cause a freeze if widget is then compiled”).
Just tested deleting that cast to widget, and that does actually seem to be case-without that it now works in PIE and standalone. Not sure how that is happening but that does seem to be cause of problem and is only thing I can see as being different from all other player controllers that are working.

I’m sorry, I’m trying to reproduce this but I’m not seeing a cast to a widget anywhere in images you’ve shared. only cast I see is to GameState. Simply creating a widget in PlayerController BP and then getting a variable from it isn’t enough to reproduce this.

Can you reproduce this using same setup crafted entirely from scratch in 4.8, or does it depend on nodes copied from 4.7 BPs? Have you tried refreshing or replacing problem cast node? If you’re able to reproduce it, can you give me some step-by-step repro steps?

Here’s a more clear scene for you to demonstrate issue I made via a new project.
(4.7 project) - Dropbox - BugTestUIChar.zip - Simplify your life
If you open that in 4.7 and play in editor it will print string and set widgets text to “Hello World” before displaying it on screen, same will occur when playing it in standalone.
However when you open that in 4.8 via open copy, first you’ll see if you play in editor that there is an error on player controller-caused by it not seeing widget variable until you recompile widget, which can sometimes cause project to freeze (known issue mentioned above).
After you successfully compile widget and have player controller working again you’ll be able to play it in editor, and it will work fine. However when you try to play it in standalone you’ll see neither printed string nor widget-it breaks player controller and you just end up having only default pawn.
Deleting end of node which creates and casts to widget to set text, then playing again in editor/in standalone, will show printed string-and fact player controller now works in both.

Hopefully this helps you find a solution to issue :slight_smile:

Hey SwiftIllusion,

Thanks for test project! With it, I was able to narrow down cause: casting for TextBlock variable is somehow stopping everything before it in chain from firing. It seems like something about this cast from inside PlayerController isn’t working. This doesn’t happen in 4.7.6, but I was able to reproduce it from scratch in 4.8 and our main internal build, so I’ve entered a bug report for issue (UE-15679). I’ll let you know when I see an update on it.

I also discovered a simple workaround: after creating a variable in widget’s graph, this stopped happening in Standalone. You don’t need to use variable or reference it anywhere, but having it there somehow fixes issue. Hope that helps!

No worries, really happy it was able to help so much!
Thank you so much for sharing that workaround, that’s great and will really help with testing out project in 4.8.

Hi SwiftIllusion,

Just wanted to let you know that this has been fixed internally, and fix was integrated into 4.8. You should see fix in 4.8 Preview 4. Please let us know if issue persists for you in that or later releases. Thanks!