Search Issue Tracker
Fixed in 8.1.0
Votes
0
Found in [Package]
8.0.0
Issue ID
1211754
Regression
No
[URP] Some tests fail due to Destroy being called at the wrong time
In IL2CPP, effects that rely on TextureCurve.Finalize in Universal Render Pipeline throw errors due to Destroy being called at the wrong time.
Reproduction Steps:
1. Clone the SRP repo: https://github.com/Unity-Technologies/ScriptableRenderPipeline
2. Open the project in TestProjects/UniversalGraphicsTest
3. Open Build Settings and disable all scenes except for 081_GradingColorCurvesLDR and 083_GradingLiftGammaGainLDR (these are the minimum required, but all scenes between 076-093 can trigger this failure)
4. Open Player Settings and change Scripting Backend to IL2CPP
5. Go to Window > General > Test Runner
6. Press "Play Mode" and then "Run all in player"
7. Wait for the build to complete, run on target, and then fail with the following error:
UnityException: Destroy can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
at UnityEngine.Rendering.TextureCurve.Finalize () [0x00000] in <00000000000000000000000000000000>:0
System.UnhandledExceptionEventHandler:Invoke(Object, UnhandledExceptionEventArgs)
Reproducible in versions 2020.1.0a18, 2020.1.0a22.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment