43GB of ram because of Procedural Sky

Hello!

We’ve updated on the Unity 2019.3.0f5. That updated the HDRP version and we also updated the Procedural Sky “sample”.
5380734--545118--upload_2020-1-17_11-9-15.png

Now the memory increase super fast when the sky is enabled (no limits, my record is 43GB of ram before Unity -and the computer- crash).
In this screenshot the horizontal arrow is the curve to follow, the vertical arrow is the moment where I disabled the sky in the volume. As you can see, it stop growing when I disable it.

Here’s the memory details. I can see two suspect things :
Under Not Saved/RenderTextures:

Under Not Saved/CubemapArray

More infos

Any ideas? This is a critical bug for us :frowning:
Thanks and have a nice day!

EDIT : The issue seem to be related to the fact that the directional light is rotating at each frame, thus regenerating the sky everytime. In the previous version this was fine and produced no memory leaks.

EDIT2 : It seem to bug only when we have the scene view and the game view opened and visible.

1 Like

Could you please submit a bug report with a reproduction project for this issue?

The issue seem to be related to the fact that the directional light is rotating at each frame, thus regenerating the sky everytime. In the previous version this was fine and produced no memory leaks.

I posted a bug report with a repro project: Case 1212191

3 Likes

Another interesting discovery : It seem to bug only when we have the scene view and the game view opened and visible.

This was fixed not too long ago. The next package release should have it
https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5409

4 Likes

Is LatestGreen the same as 7.2.0 ?

Updating packages to 7.1.8 does NOT fix the issue. :wink:

The fix will be released as part of 7.2.0.
https://issuetracker.unity3d.com/product/unity/issues/guid/1205918/

2 Likes

I’m getting crash with procedural sky. I don’t have 43 GB of ram. So I wonder if the crash is happening out of memory.

If you have a moving directional light, probably. Send your editor log so we can check.

Thank you for the update.

1 Like