Search Unity

Missing Profiler.EndSample (BeginSample and EndSample count must match):

Discussion in 'Entity Component System' started by RoughSpaghetti3211, Sep 20, 2019.

  1. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,705
    Wondering if someone can explain this error to me ?

    Code (CSharp):
    1. Missing Profiler.EndSample (BeginSample and EndSample count must match): Default World Unity.Entities.BeginSimulationEntityCommandBufferSystem
    2. Previous 5 samples:
    3.     EntityCommandBuffer.Playback
    4.     Default World Unity.Entities.EndSimulationEntityCommandBufferSystem
    5.     EntityCommandBuffer.Playback
    6.     Default World Unity.Entities.LateSimulationSystemGroup
    7.     EntityCommandBuffer.Playback
    8. In the scope:
    9.     EntityCommandBuffer.Playback
    10.     Default World Unity.Entities.BeginSimulationEntityCommandBufferSystem
    11.     Default World Unity.Entities.SimulationSystemGroup
    12.     UpdateFunction.Invoke()
    13.     SimulationSystemGroup
    14.  
     
  2. RoughSpaghetti3211

    RoughSpaghetti3211

    Joined:
    Aug 11, 2015
    Posts:
    1,705
    I think what is happening is my EntityCommandBuffer was recorded but the entity is destroyed by the live link GameObjectConversionSystem before it is played back. Any ideas how to get around this ?

    EDIT: ok disabling system one at a time this is in fact what is happening, No idea how to get around this ?

    Code (csharp):
    1.  
    2. ArgumentException: The entity does not exist
    3. EntityCommandBuffer was recorded in HexSphereBuildEntitiesSystem and played back in Unity.Entities.BeginSimulationEntityCommandBufferSystem.
    4.   at Unity.Entities.EntityComponentStore.AssertCanAddComponent (Unity.Entities.Entity entity, Unity.Entities.ComponentType componentType) [0x0000f] in ....
    5.  
     
    ju_my likes this.