I was deep profiling EnterPlaymode in an empty Unity 2019.3.0f1 project, where the editor spits out the following errors:
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ExitGUI()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEditor.dll!UnityEditor::Toolbar.DoPlayButtons()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEditor.dll!UnityEditor::Toolbar.OldOnGUI()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::IMGUIContainer.DoOnGUI()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::IMGUIContainer.HandleIMGUIEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::IMGUIContainer.HandleIMGUIEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::IMGUIContainer.SendEventToIMGUI()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::IMGUIContainer.HandleEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::CallbackEventHandler.HandleEventAtTargetPhase()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::MouseCaptureDispatchingStrategy.DispatchEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcher.ProcessEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcher.ProcessEventQueue()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcher.OpenGate()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcherGate.Dispose()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcher.ProcessEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::EventDispatcher.Dispatch()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::BaseVisualElementPanel.SendEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UIElementsUtility.DoDispatch(Non Repaint Event)
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::UIElementsUtility.DoDispatch()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.UIElementsModule.dll!UnityEngine.UIElements::UIElementsUtility.ProcessEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
EditorLoop
Main Thread
Non matching Profiler.EndSample (BeginSample and EndSample count must match): UnityEngine.IMGUIModule.dll!UnityEngine::GUIUtility.ProcessEvent()
Previous 5 samples:
GC.Alloc
UnityEditor.dll!UnityEditor::SceneVisibilityState.GeneratePersistentDataForAllLoadedScenes()
Mono.JIT
GC.Alloc
UnityEditor.dll!::AssetStoreClientInternal.IsAnyDownloadInProgress()
In the scope:
EditorLoop
Main Thread
Reproduce
- Create new 3D project
- Open Profiler
- Enable “Editor” and “Deep Profile”
- Press Start
Actual
Observe Unity outputs several “Non matching Profiler.EndSample” errors.