Search Issue Tracker

Active

Under Consideration for 6000.0.X, 6000.1.X

Votes

0

Found in

6000.0.25f1

6000.1.0a2

Issue ID

UUM-86561

Regression

No

ArgumentNullException in Custom Render Pass Tutorial

--

-

This is an issue with the code in the Custom Render Pass Tutorial for RenderGraph (https://docs.unity3d.com/6000.0/Documentation/Manual/urp/renderer-features/create-custom-renderer-feature.html)

How to reproduce:
1. Launch the “URPBlurTest“ project using CMD/Terminal with the “<path to Editor version> -projectPath "<project path> --burst-disable-compilation“
2. Open the “SampleScene“
3. Navigate to the “File/Build Profiles“ window
4. Build and Run for Android
5. Observe the Console window
6. Close the project and re-open it
7. Repeat steps 4-5

Expected result: No errors and the build succeeds every time
Actual result: Errors “Render Graph Execution error“ and “ArgumentNullException: Value cannot be null. Parameter name: material“, build fails every second attempt

Reproducible with: 6000.0.25f1, 6000.1.0a2
Could not test with: 2021.3.45f1, 2022.3.51f1 (Script compilation errors)

Reproducible environment: macOS 14.6.1 (Intel), Windows 11 (Reporters)
Not reproducible environment: No other environment tested

Reproducible with these devices:
VLNQA00511, Samsung Galaxy S8 (SM-G950F), Android 9, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00518, Google Pixel 4 (Pixel 4), Android 13, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00107, Huawei Nexus 6P (Nexus 6P), Android 8.1.0, CPU: Snapdragon 810 MSM8994, GPU: Adreno (TM) 430
VLNQA00335, Samsung Galaxy S20+ 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
VLNQA00357 - iPhone 12 Mini (MGE03ET/A), CPU: Apple A14 Bionic, GPU: Apple designed, OS: 14.1

Workaround: Add the following code snippet at the bottom of the “{{BlurRenderPass}}.{{RecordRenderGraph}}“ method:
if(material == null)
{
return;
}

Notes:
- Using the Build option in the Build Profiles will always succeed in making a working APK, the issue only appears with the Build and Run option
- Not reproducible on a project made from scratch, the errors are shown, but the build always succeeds
- More information and full errors in the comments
- After every build, you need to re-open the project, because the Game view only renders black
- Testing the Standalone application (macOS), launched the project using “/Applications/Unity/<version>/Unity.app/Contents/MacOS/Unity -projectPath <path to project> -buildTarget StandaloneOSX --burst-disable-compilation“
- Not reproducible on macOS (Intel) and Windows 11 Standalone builds (But the same errors are thrown, just the build is always successful)

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.