Search Issue Tracker

Active

Votes

1

Found in

2022.3.55f1

6000.0.33f1

6000.1.0b1

Issue ID

UUM-91837

Regression

No

Memory leak when a domain is reloaded on a Scene that uses HDRP's water simulation resources

--

-

Reproduction steps:
1. Open the attached “repro_IN-90572“ project
2. Go to “Edit → Preferences… → Jobs” and set the “Leak Detection Level“ parameter to “Enabled With Stack Trace“
3. Open the “Assets/Scenes/SampleScene.unity“ Scene
4. Open the “Assets/Test.cs“ Script
5. Change something in the Script and wait for the domain to reload
6. Observe the Console

Expected result: No messages/warnings/errors appear
Actual result: Message with a stack trace appears, indicating that a leak was found

Reproducible with: 2022.3.55f1, 6000.0.33f1, 6000.1.0b1
Couldn’t test with: 2021.3.47f1 - “ArgumentException: RenderTextureDesc width must be greater than zero.“ error is being spammed non-stop after opening the project

Reproducible on: Windows 10 (22H2), Windows 11 (23H2) (reporter’s environment)
Not reproducible on: No other environments tested

Notes:

* Issue does not appear while in the Play Mode
* If the messages in the Console doesn’t appear after first try, repeat the process a few times more

First few lines of the stack trace:
0x0000024e8d1efa6b (Mono JIT Code) Unity.Collections.NativeArray1<Unity.Mathematics.float2>:Allocate (int,Unity.Collections.Allocator,Unity.Collections.NativeArray1<Unity.Mathematics.float2>&)
0x0000024e8d1ef953 (Mono JIT Code) Unity.Collections.NativeArray`1<Unity.Mathematics.float2>:.ctor (int,Unity.Collections.Allocator,Unity.Collections.NativeArrayOptions)
0x0000024e8d1ef753 (Mono JIT Code) UnityEngine.Rendering.HighDefinition.WaterSimulationResources:AllocateSimulationBuffersCPU () (at ./Library/PackageCache/com.unity.render-pipelines.high-definition@14.0.11/Runtime/Water/HDRenderPipeline.WaterSystem.Simulation.cs:198)
0x0000024e8d1eeddb (Mono JIT Code) UnityEngine.Rendering.HighDefinition.WaterSurface:CheckResources (int,int,bool,bool&,bool&,bool&) (at ./Library/PackageCache/com.unity.render-pipelines.high-definition@14.0.11/Runtime/Water/WaterSurface.cs:627)
0x0000024e8d1ee4c3 (Mono JIT Code) UnityEngine.Rendering.HighDefinition.HDRenderPipeline:UpdateWaterSurface (UnityEngine.Rendering.CommandBuffer,UnityEngine.Rendering.HighDefinition.WaterSurface,int) (at ./Library/PackageCache/com.unity.render-pipelines.high-definition@14.0.11/Runtime/Water/HDRenderPipeline.WaterSystem.cs:428)

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.