Search Unity

Entities "InvalidOperationException: The entity does not exist", related to parentsystem

Discussion in 'Entity Component System' started by libra34567, Jan 23, 2022.

  1. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    62
    So I'm working on this unity entities project. But from time to time, with not patterns, I've been seeing this exception: InvalidOperationException: The entity does not exist.

    There's no other exceptions prior to this. And no exceptional behavior. It seems to happen completely random. I wonder how should I trace the origin of the problem that caused it. And how should I solve it.

    Here is the full console log:
    Code (CSharp):
    1. InvalidOperationException: The entity does not exist
    2. Unity.Entities.EntityComponentStore.AssertCanAddComponent (Unity.Entities.Entity entity, Unity.Entities.ComponentType componentType) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/EntityComponentStoreDebug.cs:337)
    3. Unity.Entities.EntityComponentStore.AssertCanAddComponent (Unity.Collections.NativeArray`1[T] entities, Unity.Entities.ComponentType type) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/EntityComponentStoreDebug.cs:401)
    4. Unity.Entities.EntityManager.AddComponent (Unity.Collections.NativeArray`1[T] entities, Unity.Entities.ComponentType componentType) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/EntityManagerChangeArchetype.cs:350)
    5. Unity.Transforms.ParentSystem.UpdateChangeParents () (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Transforms/ParentSystem.cs:305)
    6. Unity.Transforms.ParentSystem.OnUpdate (Unity.Jobs.JobHandle inputDeps) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Transforms/ParentSystem.cs:387)
    7. Unity.Entities.JobComponentSystem.Update () (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/JobComponentSystem.cs:136)
    8. Unity.Entities.ComponentSystemGroup.UpdateAllSystems () (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystemGroup.cs:472)
    9. UnityEngine.Debug:LogException(Exception)
    10. Unity.Debug:LogException(Exception) (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/Stubs/Unity/Debug.cs:19)
    11. Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystemGroup.cs:477)
    12. Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystemGroup.cs:417)
    13. Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystem.cs:114)
    14. Unity.Entities.ComponentSystemGroup:UpdateAllSystems() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystemGroup.cs:472)
    15. Unity.Entities.ComponentSystemGroup:OnUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystemGroup.cs:417)
    16. Unity.Entities.ComponentSystem:Update() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ComponentSystem.cs:114)
    17. Unity.Entities.DummyDelegateWrapper:TriggerUpdate() (at Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/ScriptBehaviourUpdateOrder.cs:333)
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    There's dedicated DOTS forums here you're better off posting in.

    I'll move your post for you.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    Also note that you posted this twice so I'll delete the other post here.
     
  4. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    62
    Thank you!, and sry for the mistake
     
    MelvMay likes this.