I think in EntityPatcherBlob.cs there are cases when editing live sub scenes the profile end marker is never hit. I didnt dig too deep into this
s_ApplyBlobAssetChangesProfilerMarker.End()
public static unsafe partial class EntityPatcher
{
static void ApplyBlobAssetChanges(
EntityManager entityManager,
NativeArray<EntityGuid> packedEntityGuids,
NativeMultiHashMap<int, Entity> packedEntities,
NativeArray<ComponentType> packedTypes,
NativeArray<BlobAssetChange> createdBlobAssets,
NativeArray<byte> createdBlobAssetData,
NativeArray<ulong> destroyedBlobAssets,
NativeArray<BlobAssetReferenceChange> blobAssetReferenceChanges)
{
if (createdBlobAssets.Length == 0 && blobAssetReferenceChanges.Length == 0)
return;
s_ApplyBlobAssetChangesProfilerMarker.Begin();
//......
s_ApplyBlobAssetChangesProfilerMarker.End();
// ...
Error
Non matching Profiler.EndSample (BeginSample and EndSample count must match): EntityPatcher.ApplyBlobAssetChanges
Previous 5 samples:
EntityPatcher.ApplyBlobAssetChanges
EntityPatcher.ApplyEntityPatches
GC.Alloc
DisposeSentinel.Create
EntityPatcher.ApplyLinkedEntityGroupAdditions
In the scope:
EntityPatcher.ApplyChangeSet
Default World Unity.Scenes.Editor.EditorSubSceneLiveLinkSystem
Default World Unity.Scenes.Editor.LiveLinkEditorSystemGroup
Default World Unity.Entities.InitializationSystemGroup
UnityEngine.CoreModule.dll!::UpdateFunction.Invoke()
Unity 2020.1.0f1
Entities Version 0.11.1-preview.4 - June 16, 2020