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

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.List1[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&)

Still getting this in 2021.2.0b, it worked for a few days but now it's appeared again

[quote=“jonathan_unity941”, post:2, topic: 843178]
Still getting this in 2021.2.0b, it worked for a few days but now it’s appeared again
[/quote] Could you please submit a bug report with a reproduction project attached if you’re still affected by this?

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

I've tried several times to upload the project with a bug report today, but I keep getting this:

7309714--885913--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&)

[quote=“MrDizzle26”, post:5, topic: 843178]
I’ve tried several times to upload the project with a bug report today, but I keep getting this:
[/quote]
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?

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.

1 Like

[quote=“jonathan_unity941”, post:7, topic: 843178]
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.
[/quote]
Thanks for the report! We’ll look into it.

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.

1 Like

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.

I still get it after reset the editor, I've made forum posts about it but no reply :(


Reproduced it. Case 1370661.

1 Like

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.

1 Like

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.

2 Likes

[quote=“TomasZi”, post:14, topic: 843178]
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.
[/quote]
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/issues/the-subgraph-is-showing-a-validation-error-when-it-has-a-keyword

1 Like

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

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&)

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&)

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.

Encountered this bug today in 2021.2, very annoying...