Search Issue Tracker
Duplicate
Votes
0
Found in [Package]
10.1.0
Issue ID
1290211
Regression
No
[HDRP] CustomPass memory leak on interaction with CustomPass in inspector
Reproduction steps:
1. Open attached project "HDRPCustomPassLeak.zip" and scene "CustomPass"
2. In Hierarchy window, select "VM_CustomPass" GameObject
3. In Inspector window, "Custom Pass Volume (Script)" component, interact with the Dummy Slider
4. Observe Console window
5. Enter Play Mode and repeat steps 2-4
Expected Result: If a new object is about to be called with Setup, Cleanup should be called on the destroyed object.
Actual Result: Cleanup is not called for old CustomPasses when new CustomPasses are being Setup
Reproducible with: 7.5.1 (2019.4.14f1), 9.0.0-preview.71 (2020.1.13f1), 10.1.0 (2020.2.0b11)
Could not test with: 2018.4.29f1 (console errors break project), 2021.1.0a5 (Setup and Cleanup are called only after entering/exiting Play Mode)
-
Resolution Note:
Duplicate of issue 1193322 (custom passes are using serializeReference internally which was causing this issue).
The issue is fixed in Unity 2021.1.0a5 and above and a backport is planned for 2020.2, 2020.1 and 2019.4. You can follow the original issue here:
https://issuetracker.unity3d.com/issues/serializereference-non-serialized-initialized-fields-lose-their-values-when-entering-play-mode
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
This is a duplicate of issue #1193322