Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Timeline Memory Leak when editing clip.

Discussion in 'Timeline' started by Nekuake-Edu, Mar 3, 2022.

  1. Nekuake-Edu

    Nekuake-Edu

    Joined:
    Oct 12, 2018
    Posts:
    5
    What happened?
    Everytime I try to edit a Timeline, Unity starts to take a lot of memory until it crashes, showing:
    "Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak"

    Gyazo Gif added for showing the bug: https://gyazo.com/164d59493364374dab88d6605550a022

    How to replicate?
    Weirdly, I tried to open a new project and it does not happen, same with same project in different computer, but it keeps happening in the same computer even after reinstalling.

    I do not know if I can trace back what script is taking all that memory and not liberating it, or what can I do to fix this problem.

    Specs and Workstation:
    CPU: Ryzen 3300X
    GPU: GTX 1660 SUPER
    Unity: 2021.2.13f1 with URP 12.1.4
    Cinemachine 2.8.4
    Packages:
     

    Attached Files:

  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Timeline itself doesn't create jobs, but changes that Timeline triggers may do so. It would be hard to figure out what job caused this, as it could be anything in Unity.

    If the issue only happens on a specific combination of machine and project, one thing you can try is delete your /Library/Timeline folder, and it all else fails, the entire Library folder (though I would advise doing this at the end of the day and starting a reimport to avoid wasting time).

    I don't see anything specific in the Editor log besides asset import worker threads getting spun before the leak, but that could be a red herring.
     
  3. Nekuake-Edu

    Nekuake-Edu

    Joined:
    Oct 12, 2018
    Posts:
    5
    Many thanks for your reply, firstly.
    I ran some testing and the culprit of the leak is the pressence of a terrain, specifically details like grass. Disabling the details by setting the details distance to 0 removes the leak. Tried several times, in different computers, same result.
     
  4. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Ok, I have shared this thread with the team responsible with terrain, but you may be able to get better traction by posting on the WorldBuilding forum.
     
  5. Nekuake-Edu

    Nekuake-Edu

    Joined:
    Oct 12, 2018
    Posts:
    5
    I keep testing and what I've found out is that the Memory Leak depends highly on how many objects the scene has, not only because of the terrain.
    I captured the Memory usage and I haven't been able to get anything clear as the leak is set to "untracked" memory. I cand send you the capture if you need it, but here's a screenshot: upload_2022-3-4_16-53-19.png
     
  6. TimAidley

    TimAidley

    Unity Technologies

    Joined:
    Apr 14, 2021
    Posts:
    2
    Could you please submit a bug report? Make sure you include a link to this forum post. If you are able to include a project that exhibits the behavior, that's also really useful.

    Thanks!