Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Error when loading new scene with async operations (additive)

Discussion in 'High Definition Render Pipeline' started by SNicolas, Apr 12, 2020.

  1. SNicolas

    SNicolas

    Joined:
    Apr 6, 2013
    Posts:
    32
    Hi there,

    I have been working with HDRP 7.1.8 in my project. After updating to a newer HDRP version (tested with 7.2.1 and 7.3.1) every time I load my main menu scene I get this error only in standalone (editor goes fine):

    NullReferenceException
    at (wrapper managed-to-native) UnityEngine.Component.get_gameObject(UnityEngine.Component)
    at UnityEngine.Rendering.HighDefinition.CameraCache`1[K].ClearCamerasUnusedFor (System.Int32 frameWindow, System.Int32 frameCount) [0x0009c] in C:\Proyectos\HomeTown\Library\PackageCache\com.unity.render-pipelines.high-definition@7.3.1\Runtime\Utilities\CameraCache.cs:67
    at UnityEngine.Rendering.HighDefinition.HDRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, UnityEngine.Camera[] cameras) [0x000a8] in C:\Proyectos\HomeTown\Library\PackageCache\com.unity.render-pipelines.high-definition@7.3.1\Runtime\RenderPipeline\HDRenderPipeline.cs:1190
    at UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera[] cameras) [0x0001c] in <a73b4786ce9c4ae3ad68fd41c247041a>:0
    at UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr) [0x0003d] in <a73b4786ce9c4ae3ad68fd41c247041a>:0


    Everything was working perfect back in HDRP 7.1.8, even in standalone. The issue started after the update. I tried to enable/disable cameras, testing scenes, etc... but no luck. I have no idea why this is happening. Any help would be very, very appreciated. This is a big and hard wall at the moment. I am using Unity 2019.3.7f1. Thank you!
     
  2. JPDoiron

    JPDoiron

    Joined:
    Jan 11, 2013
    Posts:
    16
  3. JPDoiron

    JPDoiron

    Joined:
    Jan 11, 2013
    Posts:
    16
    Look like they are trying to destroy an object on a camera that was already killed, most likely because we're using multiple scenes with post process volume, lights probs in different scene that the rendering camera. (speculating)

    One thing that's not speculation is that this will fix the crash if you modify CameraCache in HDRP.

    upload_2020-7-9_10-18-14.png

    best regards.

    JP
     
  4. soa81

    soa81

    Joined:
    Sep 6, 2019
    Posts:
    1
    Thanks JP, you're the only result on google for this problem. Solved it for me & much appreciated.
     
    JPDoiron likes this.