Search Unity

Bug [1.0.10] Internal: deleting an allocation that is older than its permitted lifetime of 4 frames

Discussion in 'Graphics for ECS' started by optimise, Jun 2, 2023.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I get Internal: deleting an allocation that is older than its permitted lifetime of 4 frames warning that most probably player runtime will also have the same warning. Looks like something will cause game crash.

    Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 12)
    UnityEngine.Rendering.BatchRendererGroup:Dispose ()
    Unity.Rendering.EntitiesGraphicsSystem:Dispose () (at ./Library/PackageCache/com.unity.entities.graphics@1.0.10/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs:1305)
    Unity.Rendering.EntitiesGraphicsSystem:OnDestroy () (at ./Library/PackageCache/com.unity.entities.graphics@1.0.10/Unity.Entities.Graphics/EntitiesGraphicsSystem.cs:1122)
    Unity.Entities.ComponentSystemBase:OnDestroy_Internal () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/ComponentSystemBase.cs:306)
    Unity.Entities.World:DestroyAllSystemsAndLogException () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/World.cs:1175)
    Unity.Entities.World:Dispose () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/World.cs:306)
    Unity.Entities.World:DisposeAllWorlds () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/World.cs:332)
    Unity.Entities.DefaultWorldInitialization:DomainUnloadOrPlayModeChangeShutdown () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/DefaultWorldInitialization.cs:101)
    Unity.Entities.DefaultWorldInitialization:CleanupWorldBeforeSceneLoad () (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/DefaultWorldInitialization.cs:49)

    Internal: deleting an allocation that is older than its permitted lifetime of 4 frames (age = 5)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&)

    Internal: JobTempAlloc has allocations that are more than the maximum lifespan of 4 frames old - this is not allowed and likely a leak
     
  2. inSight01

    inSight01

    Joined:
    Apr 18, 2017
    Posts:
    90
    I got this warning a few times myself. Then it stopped without me changing anything. Happened after I created a new project, installed Entities.Graphics, made a simple sphere (I guess it could be any object) in a subscene and entered Play Mode.
     
  3. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    351
    We have fixed a number of issues that cause these, and will continue to do so. As far as I know, this error message will not cause your game to crash or otherwise behave incorrectly. It informs the user that some memory (in this case, likely some memory allocated by Entities Graphics) is being freed later than 4 frames after allocation, which is against the rules for Allocator.TempJobAlloc, and might cause a slight increase in memory use.

    One of the reasons why some of these still remain is that reproducing these issues on our end has proved to be difficult. If you have a consistent repro project, please consider submitting a bug report.
     
    optimise likes this.
  4. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    700
    It would be great to demote these to Warnings or Info in Consumer builds of Unity.

    Or make an option what they should be logged as.
     
  5. xcyron

    xcyron

    Joined:
    Nov 2, 2021
    Posts:
    1
    Had the same issue and thought it was me... I reinstalled all the packages and had the same issue but when i disabled all the ECS related windows and reenabled them in the editor the issue was gone.