Search Unity

Bug Editor crash with memory debugging enabled

Discussion in 'Graphics for ECS' started by tertle, Oct 2, 2022.

  1. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Was trying to debug a memory leak in baking and noticed enabling these 3 settings
    TempMemoryLeakValidation: True
    JobTempMemoryLeakValidation: True
    ForceDebugAllocator: True

    -edit- Testing further and disabling ForceDebugAllocator stops it crashing so that seems like the culprit

    And entering play mode crashes unity 100% with this stack trace

    Code (CSharp):
    1. Obtained 39 stack frames
    2. 0x00007ff657676371 (Unity) BatchRendererGroup::~BatchRendererGroup 0x00007ff6576789df (Unity) BatchRendererGroup::Destroy
    3. 0x00007ff656d03d08 (Unity) BatchRendererGroup_CUSTOM_Destroy
    4. 0x0000028631545d61 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Rendering.BatchRendererGroup:Destroy (intptr)
    5. 0x0000028631545bdb (Mono JIT Code) UnityEngine.Rendering.BatchRendererGroup:Dispose ()
    6. 0x0000028631543ebb (Mono JIT Code) [EntitiesGraphicsSystem.cs:1186] Unity.Rendering.EntitiesGraphicsSystem:Dispose ()
    7. 0x0000028631543aab (Mono JIT Code) [EntitiesGraphicsSystem.cs:963] Unity.Rendering.EntitiesGraphicsSystem:OnDestroy ()
    8. 0x0000028631524d60 (Mono JIT Code) [ComponentSystemBase.cs:281] Unity.Entities.ComponentSystemBase:OnDestroy_Internal ()
    9. 0x0000028631523803 (Mono JIT Code) [World.cs:1001] Unity.Entities.World:DestroyAllSystemsAndLogException ()
    10. 0x0000028631520c43 (Mono JIT Code) [World.cs:303] Unity.Entities.World:Dispose ()
    11. 0x000002863151fb33 (Mono JIT Code) [World.cs:329] Unity.Entities.World:DisposeAllWorlds ()
    12. 0x000002863151d7c3 (Mono JIT Code) [DefaultWorldInitialization.cs:101] Unity.Entities.DefaultWorldInitialization:DomainUnloadOrPlayModeChangeShutdown ()
     
    Last edited: Oct 2, 2022
    UrsusDominatus1 likes this.
  2. VincentBreysse

    VincentBreysse

    Unity Technologies

    Joined:
    May 31, 2021
    Posts:
    27
    Yeah this crash is a known issue. It has been fixed already. Unfortunately it did not make it before the cutoff. Should be fixed in 2022.2.0b10.
     
    optimise, tertle and JussiKnuuttila like this.
  3. UrsusDominatus1

    UrsusDominatus1

    Joined:
    Dec 23, 2020
    Posts:
    6
    @tertle may I ask where can I find such useful settings?

    P.S. I am sorry, found them by myself in Preferences->Diagnostics->Core