[4.7.6] Player controller tick event fires in editor

Build: 4.7.6, built from source

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:

  1. Implement the tick event of a player controller blueprint eg. with “PrintString”
  2. Open that blueprint, watch the output log

Attachments: [sample project][1]

Hi VictorC,

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.

Hi Roel,

Unfortunately, I have not been able to reproduce this on my end using the steps provided.

  • What steps can I take to recreate this on my end?
  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • Is there anything else that could be calling a print string? For instance do you have anything constantly updating the construction script?

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:

  1. Create new project
  2. Create Player Controller named “test”
  3. Open project settings and add input named “UpdateKeybinding”
  4. Open “test” and add UpdateKeybinding to Event Graph
  5. Connect Update Keybinding to a print text
  6. Compile and save
  7. Exit
  8. Open uproject file in file explorer
  9. UE4 asks if I want to reopen tabs? I click okay.
  10. 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.

Edit: Here is a thread I started before I found this one which may give some more detail: UE4 Editor starts running game in background at startup without my request - Programming & Scripting - Unreal Engine Forums

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.

EDIT: Recreated the bug, posted it here

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.

  if (GetWorld()->WorldType == EWorldType::EditorPreview) { return; }

I will let you know if this is an acceptable workaround of if I notice any issues.

Hi All,

I also experienced this issue on 4.15.3

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.

Hope that helps someone!

Just want to mention that I am running into this issue on 4.16.3. Didn’t notice it before until we had some code crashing as a result of this bug.