Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved a16-a17 - AssertionException: Editor camera must resolve target upon finish rendering.

Discussion in '2021.2 Beta' started by MrDizzle26, Jun 1, 2021.

  1. MrDizzle26

    MrDizzle26

    Joined:
    Feb 8, 2015
    Posts:
    36
    I updated from a13 to a17 and this error spammed when I run the project. The Game view only renders UI and nothing else. It's the same for a16 too, rebooting in a13 removed the error and the rendering issue:

    Also using URP 12.0.0

    AssertionException: Editor camera must resolve target upon finish rendering.
    Assertion failure. Value was False
    Expected: True
    UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <1984d668efc24c65a0712183ba5836b3>:0)
    UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <1984d668efc24c65a0712183ba5836b3>:0)
    UnityEngine.Rendering.Universal.UniversalRenderer.Setup (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderer.cs:614)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:375)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:513)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:230)
    UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <1984d668efc24c65a0712183ba5836b3>:0)
    UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <1984d668efc24c65a0712183ba5836b3>:0)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  2. jonathan_unity941

    jonathan_unity941

    Joined:
    Jun 23, 2021
    Posts:
    2
    Still getting this in 2021.2.0b, it worked for a few days but now it's appeared again
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Could you please submit a bug report with a reproduction project attached if you're still affected by this?
     
  4. MrDizzle26

    MrDizzle26

    Joined:
    Feb 8, 2015
    Posts:
    36
    Ok so this happened again to me today with 2021.2.0b, I don't know exactly what triggers it but I was editing the Cinemachine Brain Blends asset when it happened.

    I tried deleting my Library folder but only a fresh reinstall of Unity seems to get rid of the problem, will submit a report.

    [Edit]: Actually a fresh install has not fixed the issue... I am at a loss how to deal with this
     
    Last edited: Jul 8, 2021
  5. MrDizzle26

    MrDizzle26

    Joined:
    Feb 8, 2015
    Posts:
    36
    I've tried several times to upload the project with a bug report today, but I keep getting this:

    upload_2021-7-8_16-28-48.png

    If you have any advice on fixes to try whilst I am waiting for a patch I would really appreciate it, I am completely blocked here.

    Here's what I wrote in the report:

    All cameras in the editor fail to render, whether in editor mode or during play

    Reoccuring issue over multiple Unity versions from 2021.2.0a13 - 2021.2.0b3.

    Mostly a guess, but the error seems to start happening when editing camera-related components in the inspector (possibly Cinemachine, but it feels random tbh)

    Once I get the error, no cameras in any scene will render. No amount of restarting the client Unity or installing different versions gets rid of the error or the problem, nor does reinstalling URP. In the past, I would switch Unity versions and it would get rid of the error for a few days, but that no longer works, I even tried updating my graphics drivers to no avail.

    No one else in the company working on the Unity project seems to get this error (10+ others), suggesting it may be a problem specific to my machine, or an issue with my registries maybe?

    Using URP 12.0.0, Unity version 2021.2.0b3

    Here's the error code I get

    AssertionException: Editor camera must resolve target upon finish rendering.

    Assertion failure. Value was False

    Expected: True

    UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <2e270fb580704b37a76809b5e53cf4ef>:0)

    UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <2e270fb580704b37a76809b5e53cf4ef>:0)

    UnityEngine.Rendering.Universal.UniversalRenderer.Setup (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderer.cs:799)

    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:410)

    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:559)

    UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/UniversalRenderPipeline.cs:264)

    UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <2e270fb580704b37a76809b5e53cf4ef>:0)

    UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <2e270fb580704b37a76809b5e53cf4ef>:0)

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr, Boolean&)
     
  6. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    There seems to be an issue with our bug reporting backend. How big is the project? We will look into it.

    For the report itself, could you please try to submit the report without the project folder attached?
     
  7. jonathan_unity941

    jonathan_unity941

    Joined:
    Jun 23, 2021
    Posts:
    2
    It appears the bug report was actually sent as I received a confirmation email, unsure if the project was sent with it but it seems to have done so. Thanks.
     
    LeonhardP likes this.
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for the report! We'll look into it.
     
  9. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Wow, wow, wow, I'm using 2021.2.0b8 and it happened for me when clicking Gizmos in Game View. I tried unchecking all the checkboxes, but then after some time some kind of crash happened - my monitors turned black and I had to restart the PC =)
    There were 2 cameras on the scene - Base and Overlay, Cinemachine was used too.
     
    letconst likes this.
  10. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @RunninglVlan, resetting the Editor layout fixed the issue for @jonathan_unity941 so if the issue persists in your project, it might be worth trying that.

    If you're able to reproduce the issue again, we'd appreciate a bug report for it.
     
  11. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    I still get it after reset the editor, I've made forum posts about it but no reply :(
     
  12. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Reproduced it. Case 1370661.
     
    LeonhardP likes this.
  13. MrDizzle26

    MrDizzle26

    Joined:
    Feb 8, 2015
    Posts:
    36
    You may have to close and reopen your game window/tab to get the error to go away, restarting Unity usually didn't help. I'm pretty sure this is down to a corrupted layout file, this version of Unity seems to use new layout files, so we presumed that the problem was caused by accidentally committing the layout files to Git and sharing them between devs.
     
    ypp0622 likes this.
  14. TomasZi

    TomasZi

    Unity Technologies

    Joined:
    Jul 21, 2016
    Posts:
    4
    Hi,
    Thank you for reporting the bug! I can confirm that the fix for rendering issue with camera stack and gizmos enabled is on its way and soon it will land in the newer version of URP.
     
    MrDizzle26 and RunninglVlan like this.
  15. Jar_Coding

    Jar_Coding

    Joined:
    Oct 5, 2017
    Posts:
    17
    Is it possible that we can get the fix also in URP 12.x.x and not just for 13.

    Its really annoying that 2021.2 is fresh out and all the bugs just get fixed in newer versions for 2022.x.
    Like this one: https://issuetracker.unity3d.com/is...wing-a-validation-error-when-it-has-a-keyword
     
    samochreno likes this.
  16. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    Can confirm this is the cause of the bug for me too:
    "There were 2 cameras on the scene - Base and Overlay, Cinemachine was used too."

    if I disable the second camera then it works fine.
    Unity 2021.2.7f1
     
  17. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Getting this issue as well in Unity 2021.2.7f1. We have 2 cameras in our scene as well, one for gameplay and one for UI (so can't really easily remove either of them). Issue suddenly just started and wasn't happening previously. We are not using Cinemachine. This is currently blocking our production as well and could really use a fix. Also submitting a bug report as well.

    Exact error for us is as follows.


    AssertionException: Editor camera must resolve target upon finish rendering.
    Assertion failure. Value was False
    Expected: True
    UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <ad50157ee00e45cdb3c8bd67012f8804>:0)
    UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <ad50157ee00e45cdb3c8bd67012f8804>:0)
    UnityEngine.Rendering.Universal.UniversalRenderer.Setup (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderer.cs:853)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:410)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:562)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:264)
    UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <ad50157ee00e45cdb3c8bd67012f8804>:0)
    UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <ad50157ee00e45cdb3c8bd67012f8804>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

     
  18. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    I also get this warning spamming as well inbetween each of the AssertionException errors:


    XRSystem.ReleaseFrame() was not called!
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
     
  19. RedVonix

    RedVonix

    Joined:
    Dec 13, 2011
    Posts:
    422
    Discovered this issue is specific to the Unity install on a single computer. Meaning:
    • I can reproduce this problem 100% of the time in multiple versions of Unity on Computer A.
    • If I pull this project onto a second computer, and open the same versions of Unity, the problem does not occur.
     
  20. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    Encountered this bug today in 2021.2, very annoying...
     
  21. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    ju57m3 and Qriva like this.
  22. NerdscapeGames

    NerdscapeGames

    Joined:
    Sep 3, 2015
    Posts:
    5
    Confirming another report for this with stacked camera setup. Turning off Gizmos in the game view stops the problem.
     
  23. IgorBoyko

    IgorBoyko

    Joined:
    Sep 28, 2020
    Posts:
    90
    Can confirm it's reproducible in 2021.2.14f1. Is it possible to fix it project-wide without waiting for another "probably not gonna include into" release and forking entire URP?
     
    Stealcase and jushiip like this.
  24. IgorBoyko

    IgorBoyko

    Joined:
    Sep 28, 2020
    Posts:
    90
    Can confirm that 2021.2.16f1 is not affected by this problem anymore, the fix seems to be deployed to latest URP update.

    Thanks to everyone involved in finding and pushing the fix.
     
    Stealcase likes this.
  25. Stealcase

    Stealcase

    Joined:
    Feb 26, 2018
    Posts:
    11
    Thanks for confirming: Just discovered this bug while trying to visualize Gizmos in a project with Cinemachine, URP and Camera Stacks.

    Going to upgrade from 2021.2.7f1 to the current version of 2021.2
     
  26. Klausbdl

    Klausbdl

    Joined:
    Aug 12, 2013
    Posts:
    64
    I came across this bug in version 2021.2.14f1. I have a double for loop that draws a lot of Wired Spheres and the editor freezes when I enable Gizmos on the Game window.

    AssertionException: Editor camera must resolve target upon finish rendering.
    Assertion failure. Value was False
    Expected: True
    UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) (at <13e6546058e340ada820e34dce3b245e>:0)
    UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) (at <13e6546058e340ada820e34dce3b245e>:0)
    UnityEngine.Rendering.Universal.UniversalRenderer.Setup (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.RenderingData& renderingData) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.5/Runtime/UniversalRenderer.cs:855)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Rendering.Universal.CameraData cameraData, System.Boolean anyPostProcessingEnabled) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.5/Runtime/UniversalRenderPipeline.cs:411)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext context, UnityEngine.Camera baseCamera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.5/Runtime/UniversalRenderPipeline.cs:563)
    UnityEngine.Rendering.Universal.UniversalRenderPipeline.Render (UnityEngine.Rendering.ScriptableRenderContext renderContext, System.Collections.Generic.List`1[T] cameras) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.5/Runtime/UniversalRenderPipeline.cs:265)
    UnityEngine.Rendering.RenderPipeline.InternalRender (UnityEngine.Rendering.ScriptableRenderContext context, System.Collections.Generic.List`1[T] cameras) (at <13e6546058e340ada820e34dce3b245e>:0)
    UnityEngine.Rendering.RenderPipelineManager.DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset pipe, System.IntPtr loopPtr, System.Collections.Generic.List`1[T] renderRequests, Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle safety) (at <13e6546058e340ada820e34dce3b245e>:0)
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
     
  27. IgorBoyko

    IgorBoyko

    Joined:
    Sep 28, 2020
    Posts:
    90
    ...read two posts above yours?
     
  28. ypp0622

    ypp0622

    Joined:
    Nov 25, 2021
    Posts:
    1
    this way definitely solve my case. thank you very much.(2021.2.6f1)