Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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,797
    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:
    28
    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