[4.7.6] Player controller tick event fires in editor

Build: 4.7.6, built from source

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:

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

Attachments: [sample project][1]

Hi VictorC,

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.

Hi ,

Unfortunately, I have not been able to reproduce this on my end using 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 construction script?

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:

  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 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.

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 - Epic Developer Community Forums

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.

EDIT: Recreated 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 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.

Hi All,

I also experienced this issue on 4.15.3

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.

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.