Description: The tick event for PlayerController subclasses/blueprints fires even if the game is not currently running. This does not occur with other blueprints, as far as I can tell (a quick peek suggests there is a problem in the way APlayerController overloads “TickActor”).
Repro Steps:
Implement the tick event of a player controller blueprint eg. with “PrintString”
Thanks for the report! I was able to reproduce this behavior in 4.7.6, however it is not happening in our main internal build. The fix should be included in the next release, 4.8, and any Preview builds for 4.8 that we may do. Please let us know if you continue to see this occur after 4.8 is release. Thanks!
This is happening for me in 4.13 as well. I have a player controller with print node hooked into it and it keeps printing even though I’m not in play mode.
Hello Adam,
This happens for me in 4.12.5 and 4.12.2
It also happens in new projects
Here is how I can reproduce it:
Create new project
Create Player Controller named “test”
Open project settings and add input named “UpdateKeybinding”
Open “test” and add UpdateKeybinding to Event Graph
Connect Update Keybinding to a print text
Compile and save
Exit
Open uproject file in file explorer
UE4 asks if I want to reopen tabs? I click okay.
After clicking ok to reopen tabs the output log spams the print text I added
Additional details: I use source control and am connected to a workspace but the new project is not checked in, nor is it in the folder that source has access to.
There is also nothing else that could be calling the print string. It is a brand new project with nothing else listed but those steps above.
Thank you for the update. I was able to reproduce this with the steps provided and have entered a bug report here. You can track the report’s status as the issue is reviewed by our development staff.
I have done more testing and have found that after tabs are reopened at least once it will spam tick every time thereafter. The only way to stop it seems to create a new project and not choose reopen tabs.
Edit: Additionally this spam slows the editor down a lot. It is extremely hard to edit anything attached to the event tick when it is spamming for instance if a save game variable is being read by event tick, if you try to edit any value in the referenced save game class while the execution wire is connected, it will take 20x longer to process your compile.
My Work Around:
This had lead me to disconnect the event tick any time I need to make an edit to variables or just in general. The issue is in my case it is connected to my player character movement which makes things harder.
I’m experiencing this bug in 4.14.1. I have a blueprint that extends from a custom PlayerController c++ class. Everytime I opened the blueprint, it would crash my editor, super frustrating. I hooked up the debugger and my call stack brought me to the tick function in my PlayerController class! I could only open the blueprint once I commented out all of the code in the tick function.
This is still present in 4.15.1(git) and causes a crash when I try to open up my PlayerController BP which is based on a custom PlayerController C++ class.
auto AimingComponent = GetPawn()->FindComponentByClass<UTankAimingComponent>();
if(!ensure(AimingComponent)) {return;}
UTankAimingComponent is a custom c++ component. According to gdb the “auto AimingCoponent…” line causes the crash.
I am trying this in my PlayerController class Tick() function.
Super::Tick(DeltaTime);
if (GetWorld()->WorldType == EWorldType::EditorPreview) { return; }
I will let you know if this is an acceptable workaround of if I notice any issues.
What fixed it for me is turning of the Start With Tick Enabled in the Class Defaults of the PlayerController. And then turning the tick on on begin play of the playercontroller.