(Case 1262531) Editor crashed after focusing Unity editor

I was working in Visual Studio and when I switched back to Unity 2020.2.0a17, the editor crashed.

No clue how to reproduce it, but you can find the project and crash dump in the bug-report. Happy investigation!

Reloading assemblies after finishing script compilation.
Begin MonoManager ReloadAssembly
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) UnityEngine.Object.DestroyImmediate (UnityEngine.Object,bool) [0x00008] in <b969d0f6c62d4231b54d5598ea8a3e10>:0
  at UnityEngine.Object.DestroyImmediate (UnityEngine.Object) [0x00005] in <b969d0f6c62d4231b54d5598ea8a3e10>:0
  at UnityEngine.UIElements.UIRUtility.Destroy (UnityEngine.Object) [0x00021] in <434515d9f4bb4f26bab9aa61f75e4922>:0
  at UnityEngine.UIElements.UIR.UIRenderDevice.ProcessDeviceFreeQueue () [0x000e0] in <434515d9f4bb4f26bab9aa61f75e4922>:0
  at UnityEngine.UIElements.UIR.UIRenderDevice.OnFlushPendingResources () [0x00007] in <434515d9f4bb4f26bab9aa61f75e4922>:0
  at UnityEngine.UIElements.UIR.Utility.RaiseFlushPendingResources () [0x0000c] in <d244757d78d942cfa821dc57aed6843a>:0
  at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) [0x0001f] in <fb001e01371b4adca20013e0ac763896>:0

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Received signal SIGSEGV
Stack trace:
0x00007ff6a924a079 (Unity) MemoryProfiler::UnregisterAllocation
0x00007ff6a89f4ddb (Unity) MemoryManager::RegisterDeallocation
0x00007ff6a89f1156 (Unity) MemoryManager::smile:eallocate
0x00007ff6a8a0307a (Unity) free_alloc_internal
0x00007ff6a7ff9311 (Unity) dynamic_array<void * __ptr64 [38],0>::~dynamic_array<void * __ptr64 [38],0>
0x00007ff6a8e40708 (Unity) Texture2D::smile:estroyTexture
0x00007ff6a8e3b588 (Unity) Texture2D::`vector deleting destructor'
0x00007ff6a8a8646d (Unity) DestroySingleObject
0x00007ff6a91b0955 (Unity) DestroyObjectHighLevel_Internal
0x00007ff6a91b0454 (Unity) DestroyObjectHighLevel
0x00007ff6a98c486e (Unity) Scripting::smile:estroyObjectFromScriptingImmediate
0x00007ff6a9b14f9c (Unity) Object_CUSTOM_DestroyImmediate
0x000001e5da46fc27 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Object:smile:estroyImmediate (UnityEngine.Object,bool)
0x000001e5da46fadb (Mono JIT Code) UnityEngine.Object:smile:estroyImmediate (UnityEngine.Object)
0x000001e5da45f98b (Mono JIT Code) UnityEngine.UIElements.UIRUtility:smile:estroy (UnityEngine.Object)
0x000001e5ae0e801b (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:ProcessDeviceFreeQueue ()
0x000001e5d6b3c733 (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:OnFlushPendingResources ()
0x000001e5d6b3c60e (Mono JIT Code) UnityEngine.UIElements.UIR.Utility:RaiseFlushPendingResources ()
0x000001e5da3dce05 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
0x00007ffda120dec0 (mono-2.0-bdwgc) [mini-runtime.c:2812] mono_jit_runtime_invoke
0x00007ffda1192932 (mono-2.0-bdwgc) [object.c:2921] do_runtime_invoke
0x00007ffda119b98f (mono-2.0-bdwgc) [object.c:2968] mono_runtime_invoke
0x00007ff6a98ce7d4 (Unity) scripting_method_invoke
0x00007ff6a98c6f85 (Unity) ScriptingInvocation::Invoke
0x00007ff6a98c0045 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff6a7faaebf (Unity) Scripting::UnityEngine::UIElements::UIR::UtilityProxy::RaiseFlushPendingResources
0x00007ff6a83a7e29 (Unity) CallbackArray::Invoke
0x00007ff6a9897669 (Unity) UnloadDomain
0x00007ff6a988bef3 (Unity) MonoManager::CreateAndSetChildDomain
0x00007ff6a988aa29 (Unity) MonoManager::BeginReloadAssembly
0x00007ff6a9893875 (Unity) MonoManager::ReloadAssembly
0x00007ff6aac270ae (Unity) ReloadAllUsedAssemblies
0x00007ff6aa5ccb70 (Unity) Application::TickTimer
0x00007ff6aaf1625f (Unity) MainMessageLoop
0x00007ff6aaf1a217 (Unity) WinMain
0x00007ff6accd3c16 (Unity) __scrt_common_main_seh
0x00007ffdf3107bd4 (KERNEL32) BaseThreadInitThunk
0x00007ffdf4f8ce51 (ntdll) RtlUserThreadStart
1 Like

It actually often happens to me since a15 or so… (Windows only)
Switch back to Unity and instant click on play while script still compiling.
Once compilation done, it crashes the editor.
Then now I wait a bit and it does run smooth…