Description: tick event for PlayerController subclasses/blueprints fires even if 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 way APlayerController overloads “TickActor”).
Repro Steps:
Implement tick event of a player controller blueprint eg. with “PrintString”
Thanks for report! I was able to reproduce this behavior in 4.7.6, however it is not happening in our main internal build. fix should be included in 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 ,
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 output log spams print text I added
Additional details: I use source control and am connected to a workspace but new project is not checked in, nor is it in folder that source has access to.
There is also nothing else that could be calling print string. It is a brand new project with nothing else listed but those steps above.
Thank you for update. I was able to reproduce this with steps provided and have entered a bug report here. You can track report’s status as 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. only way to stop it seems to create a new project and not choose reopen tabs.
Edit: Additionally this spam slows editor down a lot. It is extremely hard to edit anything attached to 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 referenced save game class while execution wire is connected, it will take 20x longer to process your compile.
My Work Around:
This had lead me to disconnect event tick any time I need to make an edit to variables or just in general. 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 blueprint, it would crash my editor, super frustrating. I hooked up debugger and my call stack brought me to tick function in my PlayerController class! I could only open blueprint once I commented out all of code in 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 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 Start With Tick Enabled in Class Defaults of PlayerController. And then turning tick on on begin play of playercontroller.