Search Issue Tracker

Fixed

Fixed in 6000.2.0b1

Votes

0

Found in

6000.0.43f1

6000.1.0b11

6000.2.0a7

Issue ID

UUM-100174

Regression

No

Crash on FindSurface when adding a custom Renderer Feature to a 2D Renderer Data Asset

-

Steps to reproduce:
1. Open the “user’s attached project”
2. Select the “Assets/Rendering/New 2D Renderer Data” Asset through the Project window
3. Click on “Add Renderer Feature” through the Inspector window
4. Select the “Camera Render to RT Feature”
5. Observe the crash

Reproducible with versions: 6000.0.43f1, 6000.1.0b11, 6000.2.0a7
Couldn’t test with versions: 2022.3.60f1 (“Camera Render to RT Feature” is not in the Renderer Features list)

Reproducible on: macOS 15.1.1 (M1 Max), Windows 10 (22H2)
Not reproducible on: no other environment tested

First few lines of StackTrace:

{noformat}#0 0x000001032fa958 in FindSurface(core::vector<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, core::allocator<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>>*, MonoRenderTargetIdentifier const&, bool, bool)
#1 0x000001032f9140 in RenderPassContext::FillNextRenderPassAttachments(RenderPassSetup&, core::vector<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, core::allocator<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>>*)
#2 0x000001032fb33c in RenderPassContext::Execute(core::vector<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, core::allocator<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>>*)
#3 0x00000103391028 in RenderingCommandBuffer::ExecuteCommandBufferWithState(ShaderPassContext&, RenderNodeQueue&, RenderingCommandBufferState*, unsigned int, ComputeQueueType) const
#4 0x0000010338d920 in RenderingCommandBuffer::ExecuteCommandBuffer(ShaderPassContext&, RenderNodeQueue&, unsigned int, core::vector<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, core::allocator<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>>*, ComputeQueueType, RenderTexture*) const{noformat}

  1. Resolution Note (fix version 6000.2.0b1):

    The issue is caused by the CameraRenderToRTFeature setting a RTHandle as a render target in the pass, and then always releasing it in FrameCleanup. This is not a good pattern, you should just create it once (or use RenderingUtils.ReAllocateHandleIfNeeded).

    The issue of editor crashing due to this type of usage will be fixed. Thank you for reporting!

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.