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
- [UIBuilder] Changes aren't detected on types implementing IList
- [HDRP] Text is rendered with artefacts when using STP and resolution scale is set a float value
- [Settings Search] Search results not matching search term correctly
- Crash on memcpy when opening a project that loads TSS files
- Multiple errors appear when compiling a ShaderGraph shader's code in a specific project
Add comment