Unity 2020.1.1-.6 Editor crash when using terrain with steam XR plugin and multi pass rendering

Hello everyone, I’ve been running into an issue with terrain in Unity 2020.1, 2020.1.2 and 2020.1.3 that crashes my editor whenever I use Steam’s XR plugin with multi-pass rendering .

This can be reproduced by creating a new scene, adding a blank terrain with a steam VR camera rig and having the XR plugin enabled with multi pass rendering mode.

I originally thought this may have been an issue with the XR plugin, so I created an issue on their GitHub:
Editor crash when using terrain with XR plugin and multi pass rendering · Issue #38 · ValveSoftware/unity-xr-plugin · GitHub, but the maintainer of the plugin was able to quickly point out that the stacktrace has unity native code errors coming up.

I’ve added a part of the editor crash log that I believe may be relevant to the end of this post as well as uploaded the full editor log.

Any idea what may be going on here?

[XR] [OpenVR] is initialized
[Subsystems] Loading plugin XRSDKOpenVR for subsystem OpenVR Input...
[XR] XR OpenVR Display Start
[XR] [OpenVR] Set active mirror mode (-2)
<b>[SteamVR]</b> Initialized. Connected to lighthouse:LHR-90AED6B5
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Valve.VR.SteamVR:.ctor() (at Assets\SteamVR\Scripts\SteamVR.cs:667)
Valve.VR.SteamVR:CreateInstance() (at Assets\SteamVR\Scripts\SteamVR.cs:220)
Valve.VR.SteamVR:Initialize(Boolean) (at Assets\SteamVR\Scripts\SteamVR.cs:103)
Valve.VR.SteamVR_Behaviour:InitializeSteamVR(Boolean) (at Assets\SteamVR\Scripts\SteamVR_Behaviour.cs:119)
Valve.VR.SteamVR_Behaviour:Awake() (at Assets\SteamVR\Scripts\SteamVR_Behaviour.cs:100)
(Filename: Assets/SteamVR/Scripts/SteamVR.cs Line: 667)

Loaded scene 'Temp/__Backupscenes/0.backup'
   Deserialize:            121.606 ms
   Integration:            3434.443 ms
   Integration of assets:  0.179 ms
   Thread Wait Time:       17.124 ms
   Total Operation Time:   3573.353 ms
[XR] [OpenVR] Device connecting (status change). OpenVRIndex: 0. UnityID: 0
[XR] [OpenVR] Device connecting (status change). OpenVRIndex: 1. UnityID: 1
[XR] [OpenVR] Device connecting (status change). OpenVRIndex: 2. UnityID: 2
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::RequestCreateTexture
XRTextureManager::SetupRenderTextureFromXRRequest (id: 1 col: 0000000000000000 d: 0000000000000000)
XRTextureManager::SetupRenderTextureFromXRRequest (id: 2 col: 0000000000000000 d: 0000000000000000)
XRTextureManager::SetupRenderTextureFromXRRequest (id: 3 col: 0000000000000000 d: 0000000000000000)
XRTextureManager::SetupRenderTextureFromXRRequest (id: 4 col: 0000000000000000 d: 0000000000000000)
RenderTexture->Create
RenderTexture->Create
RenderTexture->Create
RenderTexture->Create
Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) UnityEditor.EditorGUIUtility.RenderPlayModeViewCamerasInternal_Injected (UnityEngine.RenderTexture,int,UnityEngine.Vector2&,bool,bool) [0x0000c] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.EditorGUIUtility.RenderPlayModeViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Vector2,bool,bool) [0x00007] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.PlayModeView.RenderView (UnityEngine.Vector2,bool) [0x000ea] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.GameView.OnGUI () [0x002ee] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect) [0x00066] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.DockArea.DrawView (UnityEngine.Rect,UnityEngine.Rect) [0x00004] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEditor.DockArea.OldOnGUI () [0x001a5] in <701f6580abad44cfb237a543dcd0d94b>:0
  at UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool) [0x001d6] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool) [0x000c8] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () [0x0005a] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&) [0x000bd] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIR.UIRenderDevice.EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&) [0x00536] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIR.RenderChain.Render () [0x0011f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x0006c] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase) [0x0001f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.Panel.UpdateForRepaint () [0x0003c] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event) [0x00099] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel) [0x00029] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&) [0x0003f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (int,intptr) [0x0001f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.UIElements.UIEventRegistration/<>c.<.cctor>b__1_2 (int,intptr) [0x00003] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
  at UnityEngine.GUIUtility.ProcessEvent (int,intptr,bool&) [0x00018] in <2500dd078a544a69b6c923861af6cd15>:0
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr) [0x0002d] in <2500dd078a544a69b6c923861af6cd15>:0

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

Crash!!!

6236367–686616–Editor Log.txt (58.9 KB)

Can anyone help me decipher what is going on in that stacktrace?
Not being able to use a terrain object in this scene is a showstopper for my game.

Any help would be appreciated.

Having the same problem. This is weird

Thank you for validating this dude. I’m hoping someone from the Unity team can respond with a fix or solution.

1 Like

It is marked as solved here… but it is not at all.
I’m using Unity 2019.4.9f1 HDRP

Yeah noticed that this has been around for a minute as well.
I’m using the standard render pipeline on 2020.1.3 at the moment, so it doesn’t seem to be render pipeline dependent.

Still having the problem on Unity 2020.1.4f, has anyone been able to find a workaround? It’s incredibly frustrating that Unity shut down the issuetracker thread for this bug.

Same here dude.
It is a little worrying that this is such a persistent problem and we get nothing from the Unity team on this.

Updated to Unity 2020.1.5f1 and the problem still persists

1 Like

Unity 2020.1.6f1 - the problem still persists

Same here…Unity 2019.4.11
SteamVR 2.6.1
openvr xr plugin 1.0.1

I wanted to develop a new software in the next months and I have the same problem as you guys. Is there any problem solutuion in sight from unity or valve?

I have it working fine with URP and single pass instanced on 2020.1.3. Was just hard finding plugins that support single pass instanced but I have my game working with terrains

Issue still exist in 2020.1.13 and there is no new issue tracker on it, most of us cant use single pass like hollow world games suggested as our processing and image effects rely on multipass for vr support,

Creating a project, adding a terrain, enabling XR and setting it to multipass just crashes the editor in play mode.

Just hit this issue myself. Can’t believe there’s no fix. :frowning:

For me though, I can (just) get away with just a terrain, but if there’s any details on it (trees, whatever) it crashes. After a crash, all my Steam Input settings are normally reset.

Graeme

Edit: Using 2019.4.17f1, SteamVR 2.7.1, OpenVR 1.01 (also tried 1.1.3) … from Valve.

Hi, may be i’m not at the right place here, i’m looking for the conversations abour XR VR steam Asset, under Unity from 2020 revolution. 2020.1, 2020.2, it looks like they completely changed the approach of VR, … And the asset is not beahaving same way…

Cheers for the enlightment.

Del

I tried to use the new system. I really tried. In the end I reverted back to the Legacy XR/VR system in 2019.4.17f1 and all my problems just went away. :confused:

Graeme

Hmm Graeme, its just very precious what your just wrote down.
You mean, you turned OFF in the player setting, the new XR module, and just re-installed the classical SteamVR asset from the asset store, and thats it ; -)… ? Am I reading you right ??

I did not know we could do it !!!

Thanks for this precious post.

Well it wasn’t that simple as both SteamVR and ViveInputUtility would fight each other to reinstall their respective components that they wanted. It was a nightmare. I deleted both assets from my project in Unity 2019.4.17f1, disabled then removed the XR plugin system (edit: remove the OpenVR XR plug in also).

I then imported SteamVR 2.7.1, and went through its setup. I think it automatically installed it’s required OpenVR legacy package, for the previous legacy VR system. I made sure that was functioning correctly in the example scenes. I think I had to comment out broken ViveInputUtility stuff in my code to allow SteamVR to function fully, due to errors being generated by my code. I used SteamVR’s imported action set to let the examples work properly.

Then I imported ViveInputUtility again with recommended settings, including creation of its own action set which my game uses anyway, pointed the SteamVR manager back to this action set in my game, then my game was working again with the old legacy VR system.

The reason I reverted back was because the new XR plug-in system, with the current OpenVR package, did not work for me. Whenever any terrain detail was drawn (trees, grass, whatever), Unity would crash with some obscure error.

Basically the new Valve SteamVR XR Plugin for the new Unity XR/VR system did not work for me. I had nightmares for days afterwards…

If I can stick with 2019.4 I’ll do just that for my project!

I hope that helps?

Graeme

Just ran into this myself. Wasn’t getting TMPro rendering in both eyes and realized I was on single pass. Changed to multipass and GREAT I SEE TEXT!!! but whenever I load into most of my scenes the editor crashes. Interestingly it doesn’t crash until I change from my scene with no terrain (menu area set in an office) to a scene with terrain (outdoor area.)