Page MenuHomeFeedback Tracker

Info displays weird behavior in workbench world editor
Assigned, NormalPublic

Description

Here's my custom info display added to {A1AE127F16DD352E}Prefabs/Characters/Core/DefaultPlayerControllerMP_Factions.et

The script class

class HCA_SCR_ScreenEffects : SCR_InfoDisplayExtended {

    static int s_iTotalCount = 0;
    void HCA_SCR_ScreenEffects () {
        HCA_OnConstructor();
    };
    void ~HCA_SCR_ScreenEffects () {
        HCA_OnDeConstructor();
    };


    private void HCA_OnConstructor () {
        s_iTotalCount++;
        Print("HCA::HCA_SCR_ScreenEffects::HCA_OnConstructor:" + s_iTotalCount);
    };
    private void HCA_OnDeConstructor () {
        s_iTotalCount = s_iTotalCount -1;
        Print("HCA::HCA_SCR_ScreenEffects::HCA_OnDeConstructor:" + s_iTotalCount);
    };

This is how the logs look like on the log console in workbench when I'm in play mode:

When I close the workbench while in game mode:

19:05:22:931 SCRIPT    (E): Leaked 'HCA_SCR_ScreenEffects' script instance (3x)!
19:05:22:931 SCRIPT    (E): Leaked 'array<BaseInfoDisplay>' script instance (3x)!

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Add new SCR_InfoDisplayExtended
  2. Add print to the constructor and destructor functions
  3. Add it to the info displays on the character controller
  4. go into play mode in world editor
  5. observe the debug log
  6. close workbench while in play mode
  7. the error pops up about memory leak
Additional Information

I ran the peer plugin and it didn't print the debug, it seems to be a workbench only bug

Event Timeline

Geez changed the task status from New to Assigned.Apr 4 2023, 11:55 AM