Reproduction steps:
1. Open the attached “ReproCrash” project
2. Open the “Assets/Scenes/SampleScene.unity” scene
3. Enter the Play Mode
4. Create a new Material by right-clicking in the Project window > Create > Material
Expected result: A new Material is created and its preview is visible
Actual result: The Editor crashes
Reproducible with: 2022.2.0a10, 2022.3.14f1, 2023.2.2f1, 2023.3.0a16
Not reproducible with: 2021.3.32f1, 2022.2.0a9
Reproducible on: macOS 14.1.1 (M1 Max), macOS 14.0 (Intel)
Not reproducible on: Windows 10
First few lines of the stack trace:
#0 0x00000100eeca98 in RenderEventsContext::ExecuteCommandBuffers(int, unsigned int, ShaderPassContext&, RenderNodeQueue&, profiling::Marker*, int) const
#1 0x00000100db69f0 in ForwardShaderRenderLoop::PerformRendering(JobFence&, ActiveLight const*, ShadowJobData const&, bool, bool, bool, Camera::RenderFlag)
#2 0x00000100db7bc8 in DoForwardShaderRenderLoop(RenderLoopContext const&, dynamic_array<RenderObjectData, 0ul>&, CullResults const&, bool, bool, bool, Camera::RenderFlag)
#3 0x00000100dad1f8 in DoRenderLoop(RenderLoop&, RenderingPath, CullResults&, ShadowMapCache&)
#4 0x00000100d433dc in Camera::MultiCustomRender(CullResults&, Camera::PerformRenderFunction* const*, unsigned long, bool)
#5 0x00000100d436cc in Camera::DoRender(CullResults&, Camera::RenderFlag, Camera::PerformRenderFunction*)