Search Unity

Bug Memory Leak in Profiler in 2020.3.25f1

Discussion in 'Editor & General Support' started by PotatoWiz, Jan 10, 2022.

  1. PotatoWiz

    PotatoWiz

    Joined:
    Aug 26, 2021
    Posts:
    7
    Hi,

    I'm having this weird problem where I input any key from the keyboard, the texture count increases by 2 when pressed and by 2 when the key released. No matter what the key is, bound to an action or not, it still does it, so every time it happens, the memory piles up, and causes memory leak.

    I have tried duplicating the project, then removing all assets then creating an empty scene. It still happens with virtually nothing in the scene and in asset, each keyboard key press and releases, it increments textures by 2, increasing memory use. I've been looking around at the Project Settings and still have no clue, switching around New Input System to Old Input System, no luck.

    The only solution I can think of right now is to simply move the assets to a new project, however, I would like to know what is causing this so it can be prevented next time without having to migrate to a new project.
     
  2. PotatoWiz

    PotatoWiz

    Joined:
    Aug 26, 2021
    Posts:
    7
    upload_2022-1-10_19-45-53.png

    Looking into the detailed stats in profiler, this is what comes up each time I press a key. No clue what is going on.

    Edit : This only happens when I switched to 2020.3.25f1 as of now, just tested, this bug starts from 2020.3.21f1
     
    Last edited: Jan 11, 2022
  3. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,461
    Looks like something is creating
    new Texture2D()
    objects and not assigning a name to their
    .name
    property. Does the Memory Profiler show any references (right side panel when the textures are selected. Good chance that only one of them is still referenced so might be worth to test all of them) in the details capture?
    Or does the Memory Profiler package show a non 0 value on the References column for any of these unnamed textures? Clicking that number could then help identify what created the textures.
     
  4. PotatoWiz

    PotatoWiz

    Joined:
    Aug 26, 2021
    Posts:
    7
    upload_2022-1-11_14-22-9.png
    I tried clicking on every single one of them, it was empty. Every key press on my keyboard adds a new Texture2D for some reason, and FYI this is on a brand new and empty project I created. This happens from version 2020.3.21f1 to 2020.3.25f1, I've test it. Anything before 2020.3.21f1, don't have this problem.

    I've submitted a bug report on the editor, but I am not sure how to find it on Unity's issue tracker, or maybe I need to submit it different way for Unity's issue tracker to show up.

    Edit : Starting from 2020.3.21f1 sorry
     
    Last edited: Jan 11, 2022
  5. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,461
    It won't show up on the issue tracker until it's reproduced and verified by QA. You should have gotten an email reply with the issue ID though. That number would help in connecting this thread with the bug. :)
     
  6. PotatoWiz

    PotatoWiz

    Joined:
    Aug 26, 2021
    Posts:
    7
    The case is 1393853 , anyways, thanks for the direction!
     
    Last edited: Jan 11, 2022
    MartinTilo likes this.
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,461
    Hey, I just saw this post and was wondering if you might happen to have the Version Control package and Plastic SCM added to your project?
     
    Geriko likes this.
  8. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,461
    if that's the case, then there is already a case for that that is being worked on. That case is tracked here and I've noted your case as a possible duplicate.