[Case 1250990] Unity crashes when scene contains subscene and async shader compilation is enabled

Unity 2019.3.14
Entities 0.11
Hybrid renderer 0.5.1
HDRP 7.3.1

I have a scene with subscene with 1 cube in it. After I closed subcene unity instantly crashed. After that it crashes every time I open the editor.
I’ve opened the case after crash with the same title with small repro project. But there was no field for email in reproter so I didn’t know the case number.

1 Like

Found it: Case 1250990

Is there a way to search the issue tracker by case id? Or maybe some URL it can be pasted in?

No, I just received an email, even I didn’t fill my email in bug reporter. Looks like it was cached from previous reports.

Even downgrading to 0.9.1 where everything worked doesn’t help. I don’t know what to do.

Looks like something going on with attaching a shader compiler:

Launched and connected shader compiler UnityShaderCompiler.exe after 0.05 seconds
Assertion failed on expression: 'data->elementSize'
UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal_Injected(ScriptableRenderContext&)
UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal()
UnityEngine.Rendering.ScriptableRenderContext:Submit()
UnityEngine.Rendering.HighDefinition.HDRenderPipeline:Render(ScriptableRenderContext, Camera[]) (at Library\PackageCache\com.unity.render-pipelines.high-definition@7.3.1\Runtime\RenderPipeline\HDRenderPipeline.cs:1782)
UnityEngine.Rendering.RenderPipeline:InternalRender(ScriptableRenderContext, Camera[])
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, AtomicSafetyHandle)
UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal_Injected(RenderTexture, Int32, Vector2&, Boolean, Boolean)
UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal(RenderTexture, Int32, Vector2, Boolean, Boolean)
UnityEditor.PlayModeView:RenderView(Vector2, Boolean)
UnityEditor.GameView:OnGUI()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object)
UnityEditor.HostView:Invoke(String)
UnityEditor.HostView:InvokeOnGUI(Rect, Rect)
UnityEditor.DockArea:smile:rawView(Rect, Rect)
UnityEditor.DockArea:OldOnGUI()
UnityEngine.UIElements.IMGUIContainer:smile:oOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:smile:oIMGUIRepaint()
UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh(DrawParams, Boolean, Single, Exception&)
UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain(RenderChainCommand, Rect, Matrix4x4, PanelClearFlags, Texture, Texture, Texture, Single, NativeArray`1, NativeArray`1, Exception&)
UnityEngine.UIElements.UIR.UIRenderDevice:smile:rawChain(RenderChainCommand, Rect, Matrix4x4, PanelClearFlags, Texture, Texture, Texture, Single, NativeArray`1, NativeArray`1, Exception&)
UnityEngine.UIElements.UIR.RenderChain:Render(Rect, Matrix4x4, PanelClearFlags)
UnityEngine.UIElements.UIRRepaintUpdater:smile:rawChain(Rect, Matrix4x4)
UnityEngine.UIElements.UIRRepaintUpdater:Update()
UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
UnityEngine.UIElements.Panel:UpdateForRepaint()
UnityEngine.UIElements.Panel:Repaint(Event)
UnityEngine.UIElements.UIElementsUtility:smile:oDispatch(BaseVisualElementPanel)
UnityEngine.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[C:\buildslave\unity\build\Runtime/Graphics/ScriptableRenderLoop/ScriptableBatchRenderer.cpp line 365]
(Filename: Library/PackageCache/com.unity.render-pipelines.high-definition@7.3.1/Runtime/RenderPipeline/HDRenderPipeline.cs Line: 1782)

Assertion failed on expression: 'data->elementSize'
UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal_Injected(ScriptableRenderContext&)
UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal()
UnityEngine.Rendering.ScriptableRenderContext:Submit()
UnityEngine.Rendering.HighDefinition.HDRenderPipeline:Render(ScriptableRenderContext, Camera[]) (at Library\PackageCache\com.unity.render-pipelines.high-definition@7.3.1\Runtime\RenderPipeline\HDRenderPipeline.cs:1782)
UnityEngine.Rendering.RenderPipeline:InternalRender(ScriptableRenderContext, Camera[])
UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal(RenderPipelineAsset, IntPtr, AtomicSafetyHandle)
UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal_Injected(RenderTexture, Int32, Vector2&, Boolean, Boolean)
UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal(RenderTexture, Int32, Vector2, Boolean, Boolean)
UnityEditor.PlayModeView:RenderView(Vector2, Boolean)
UnityEditor.GameView:OnGUI()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Reflection.MethodBase:Invoke(Object, Object[])
UnityEditor.HostView:Invoke(String, Object)
UnityEditor.HostView:Invoke(String)
UnityEditor.HostView:InvokeOnGUI(Rect, Rect)
UnityEditor.DockArea:smile:rawView(Rect, Rect)
UnityEditor.DockArea:OldOnGUI()
UnityEngine.UIElements.IMGUIContainer:smile:oOnGUI(Event, Matrix4x4, Rect, Boolean, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect, Action, Boolean)
UnityEngine.UIElements.IMGUIContainer:smile:oIMGUIRepaint()
UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh(DrawParams, Boolean, Single, Exception&)
UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain(RenderChainCommand, Rect, Matrix4x4, PanelClearFlags, Texture, Texture, Texture, Single, NativeArray`1, NativeArray`1, Exception&)
UnityEngine.UIElements.UIR.UIRenderDevice:smile:rawChain(RenderChainCommand, Rect, Matrix4x4, PanelClearFlags, Texture, Texture, Texture, Single, NativeArray`1, NativeArray`1, Exception&)
UnityEngine.UIElements.UIR.RenderChain:Render(Rect, Matrix4x4, PanelClearFlags)
UnityEngine.UIElements.UIRRepaintUpdater:smile:rawChain(Rect, Matrix4x4)
UnityEngine.UIElements.UIRRepaintUpdater:Update()
UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase(VisualTreeUpdatePhase)
UnityEngine.UIElements.Panel:UpdateForRepaint()
UnityEngine.UIElements.Panel:Repaint(Event)
UnityEngine.UIElements.UIElementsUtility:smile:oDispatch(BaseVisualElementPanel)
UnityEngine.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

[C:\buildslave\unity\build\Runtime/Graphics/ScriptableRenderLoop/ScriptableBatchRenderer.cpp line 365] 
(Filename: Library/PackageCache/com.unity.render-pipelines.high-definition@7.3.1/Runtime/RenderPipeline/HDRenderPipeline.cs Line: 1782)

0x00007FF708944F69 (Unity) GfxDeviceD3D11Base::smile:rawBuffersBatchMode
0x00007FF7089FFE2C (Unity) GfxDeviceWorker::RunCommand
0x00007FF708A039AC (Unity) GfxDeviceWorker::RunExt
0x00007FF708A03D98 (Unity) GfxDeviceWorker::RunGfxDeviceWorker
0x00007FF70989B183 (Unity) Thread::RunThreadWrapper
0x00007FFE6C507BD4 (KERNEL32) BaseThreadInitThunk
0x00007FFE6CECCE51 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
 * C:/Users/iamar/AppData/Local/Temp/Unity/Editor/Crashes

Is there any way to trigger shader compilation before loading subscene?

Just out of curiosity what machine are you and OS

Ok, turning off async shader compilation is a working workaround for now. Will update the title of topic.

We’ve fixed an issue related to crashes caused by async shader compilation on 2019.3 recently; it looks like it didn’t make the cut for 2019.3.14. Should be in the next release.

1 Like

Thanks for info!