UBaseManager ticks twice per-frame when you 'Eject'

Not sure if this is intentional, but a colleague recently traced an issue he was having back to double-ticking of a BaseManager when he ejected from play. He uses Manager as hook for his custom AI engine.

Thought this was worth mentioning! Simply create your own BaseManager class (we use them as Managers) and eject during play, you’ll see Game Instance ticks twice per frame often causing severe slow-downs.

Hey ,

How are you determining that GameInstance ticks twice per frame when ejected? Can you elaborate on test case you used so we can reproduce it here? Thanks!

Hi , I’ll ask my colleague how he worked it out ASAP. Thanks!

Hi , here’s feedback I got:

Basically he has implemented several custom Managers which inherit from both UObject and FTickableGameObject.

way to trace double ticking is fairly simple, just insert a breakpoint in the ‘Tick’ Function of his Manager class and also in Character class in his level. Characters tick once for each Character that’s in level, and in regular play, Manager does as well.

He uses Manager class to hook into his custom AI engine, but when Ejecting, Manager ‘Tick’ function is called twice before characters, and continues to do so. He traced issue back to ‘Engine.cpp’, Lines 1225 and 1020.

Because in ‘Eject’ mode Editor and Game are both ticking, both of those lines call Tick on Managers, and so Manager ticks twice.

Hope this helps!

Additionally to this, people in question did some more digging, and traced issue back to an actual logic issue with Level Tick? Doesn’t mean anything to me but might help.

Apparently this has been reported before, but hasn’t been looked into yet.

Hi ,

Sorry for delay in getting back to you on this issue. I just tried to reproduce issue that you described, but had some trouble doing so. I have some questions that will hopefully clear things up and allow me to reproduce this.

  • What version of Engine are you using?
  • Is UBaseManager a custom class that has been created in your project? I was not able to locate this class in Engine source code.
  • I was unable to build project code after adding a class that inherited from both UObject and FTickableGameObject. Would it be possible to get code for one of manager classes that you have created?
  • Are you certain that issue is located in lines 1020 and 1225 of Engine.cpp? When I looked at that file it only had 173 lines.
  • Do you happen to know where this issue was reported previously?

Hi ,

Sorry I was re-posting this message from somebody next to me in office (buggers are too lazy to report it themselves ;)). I’ll ask again tomorrow.

I also may have made a mistake with UBaseManager, I think it should actually have been UGameInstance,… I’ll check again tomorrow!

Hi ,

We have not heard back from you for a few days. Were you able to get additional information? I will be marking this issue as resolved for tracking purposes, but please feel free to re-open post at any time with any additional information you may have.

do you know if this problem is resolved in newly released 4.7? I checked patch notes but did not notice change related to this bug. Thank you for your time.

Hi ,

I was unable to reproduce issue that described. If you are seeing same issue, would you have any additional information that may help us reproduce issue and see what is happening?