Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity wants to learn about your experiences working on a Unity project today. We'd like to hear from you via this survey.
    Dismiss Notice
  3. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  4. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  5. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

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

Discussion in 'AR/VR (XR) Discussion' started by p13t3rm, Aug 24, 2020.

  1. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    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:
    https://github.com/ValveSoftware/unity-xr-plugin/issues/38, 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?

    Code (CSharp):
    1. [XR] [OpenVR] is initialized
    2. [Subsystems] Loading plugin XRSDKOpenVR for subsystem OpenVR Input...
    3. [XR] XR OpenVR Display Start
    4. [XR] [OpenVR] Set active mirror mode (-2)
    5. <b>[SteamVR]</b> Initialized. Connected to lighthouse:LHR-90AED6B5
    6. UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    7. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    8. UnityEngine.Logger:Log(LogType, Object)
    9. UnityEngine.Debug:Log(Object)
    10. Valve.VR.SteamVR:.ctor() (at Assets\SteamVR\Scripts\SteamVR.cs:667)
    11. Valve.VR.SteamVR:CreateInstance() (at Assets\SteamVR\Scripts\SteamVR.cs:220)
    12. Valve.VR.SteamVR:Initialize(Boolean) (at Assets\SteamVR\Scripts\SteamVR.cs:103)
    13. Valve.VR.SteamVR_Behaviour:InitializeSteamVR(Boolean) (at Assets\SteamVR\Scripts\SteamVR_Behaviour.cs:119)
    14. Valve.VR.SteamVR_Behaviour:Awake() (at Assets\SteamVR\Scripts\SteamVR_Behaviour.cs:100)
    15. (Filename: Assets/SteamVR/Scripts/SteamVR.cs Line: 667)
    16.  
    17. Loaded scene 'Temp/__Backupscenes/0.backup'
    18.    Deserialize:            121.606 ms
    19.    Integration:            3434.443 ms
    20.    Integration of assets:  0.179 ms
    21.    Thread Wait Time:       17.124 ms
    22.    Total Operation Time:   3573.353 ms
    23. [XR] [OpenVR] Device connecting (status change). OpenVRIndex: 0. UnityID: 0
    24. [XR] [OpenVR] Device connecting (status change). OpenVRIndex: 1. UnityID: 1
    25. [XR] [OpenVR] Device connecting (status change). OpenVRIndex: 2. UnityID: 2
    26. XRTextureManager::RequestCreateTexture
    27. XRTextureManager::RequestCreateTexture
    28. XRTextureManager::RequestCreateTexture
    29. XRTextureManager::RequestCreateTexture
    30. XRTextureManager::SetupRenderTextureFromXRRequest (id: 1 col: 0000000000000000 d: 0000000000000000)
    31. XRTextureManager::SetupRenderTextureFromXRRequest (id: 2 col: 0000000000000000 d: 0000000000000000)
    32. XRTextureManager::SetupRenderTextureFromXRRequest (id: 3 col: 0000000000000000 d: 0000000000000000)
    33. XRTextureManager::SetupRenderTextureFromXRRequest (id: 4 col: 0000000000000000 d: 0000000000000000)
    34. RenderTexture->Create
    35. RenderTexture->Create
    36. RenderTexture->Create
    37. RenderTexture->Create
    38. Stacktrace:
    39.  
    40.   at <unknown> <0xffffffff>
    41.   at (wrapper managed-to-native) UnityEditor.EditorGUIUtility.RenderPlayModeViewCamerasInternal_Injected (UnityEngine.RenderTexture,int,UnityEngine.Vector2&,bool,bool) [0x0000c] in <701f6580abad44cfb237a543dcd0d94b>:0
    42.   at UnityEditor.EditorGUIUtility.RenderPlayModeViewCamerasInternal (UnityEngine.RenderTexture,int,UnityEngine.Vector2,bool,bool) [0x00007] in <701f6580abad44cfb237a543dcd0d94b>:0
    43.   at UnityEditor.PlayModeView.RenderView (UnityEngine.Vector2,bool) [0x000ea] in <701f6580abad44cfb237a543dcd0d94b>:0
    44.   at UnityEditor.GameView.OnGUI () [0x002ee] in <701f6580abad44cfb237a543dcd0d94b>:0
    45.   at UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect,UnityEngine.Rect) [0x00066] in <701f6580abad44cfb237a543dcd0d94b>:0
    46.   at UnityEditor.DockArea.DrawView (UnityEngine.Rect,UnityEngine.Rect) [0x00004] in <701f6580abad44cfb237a543dcd0d94b>:0
    47.   at UnityEditor.DockArea.OldOnGUI () [0x001a5] in <701f6580abad44cfb237a543dcd0d94b>:0
    48.   at UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool) [0x001d6] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    49.   at UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool) [0x000c8] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    50.   at UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () [0x0005a] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    51.   at UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&) [0x000bd] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    52.   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
    53.   at UnityEngine.UIElements.UIR.RenderChain.Render () [0x0011f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    54.   at UnityEngine.UIElements.UIRRepaintUpdater.Update () [0x0006c] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    55.   at UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase) [0x0001f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    56.   at UnityEngine.UIElements.Panel.UpdateForRepaint () [0x0003c] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    57.   at UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event) [0x00099] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    58.   at UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel) [0x00029] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    59.   at UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&) [0x0003f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    60.   at UnityEngine.UIElements.UIEventRegistration.ProcessEvent (int,intptr) [0x0001f] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    61.   at UnityEngine.UIElements.UIEventRegistration/<>c.<.cctor>b__1_2 (int,intptr) [0x00003] in <9c9fa79efe9e479a8cbe7a6f99f673d3>:0
    62.   at UnityEngine.GUIUtility.ProcessEvent (int,intptr,bool&) [0x00018] in <2500dd078a544a69b6c923861af6cd15>:0
    63.   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr) [0x0002d] in <2500dd078a544a69b6c923861af6cd15>:0
    64.  
    65. =================================================================
    66. Got a SIGSEGV while executing native code. This usually indicates
    67. a fatal error in the mono runtime or one of the native libraries
    68. used by your application.
    69. =================================================================
    70.  
    71. Crash!!!
     

    Attached Files:

    Last edited: Aug 24, 2020
  2. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    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.
     
  3. LorenzoValente

    LorenzoValente

    Joined:
    May 2, 2019
    Posts:
    37
    Having the same problem. This is weird
     
  4. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    Thank you for validating this dude. I'm hoping someone from the Unity team can respond with a fix or solution.
     
    LorenzoValente likes this.
  5. LorenzoValente

    LorenzoValente

    Joined:
    May 2, 2019
    Posts:
    37
  6. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    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.
     
  7. VCUMCL

    VCUMCL

    Joined:
    Jun 5, 2017
    Posts:
    13
    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.
     
  8. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    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.
     
  9. VCUMCL

    VCUMCL

    Joined:
    Jun 5, 2017
    Posts:
    13
    Updated to Unity 2020.1.5f1 and the problem still persists
     
    p13t3rm likes this.
  10. tytyka

    tytyka

    Joined:
    Sep 25, 2014
    Posts:
    1
    Unity 2020.1.6f1 - the problem still persists
     
  11. unicornmeister

    unicornmeister

    Joined:
    Oct 3, 2020
    Posts:
    7
    Same here...Unity 2019.4.11
    SteamVR 2.6.1
    openvr xr plugin 1.0.1
     
  12. dineXtion

    dineXtion

    Joined:
    Aug 25, 2018
    Posts:
    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?
     
  13. dwatt-hollowworldgames

    dwatt-hollowworldgames

    Joined:
    Apr 26, 2019
    Posts:
    73
    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
     
  14. sedwity1

    sedwity1

    Joined:
    Dec 8, 2020
    Posts:
    2
    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.
     
  15. RakkuAmiya

    RakkuAmiya

    Joined:
    Jan 9, 2016
    Posts:
    49
    Just hit this issue myself. Can't believe there's no fix. :(

    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.
     
  16. Del_Passos

    Del_Passos

    Joined:
    Jan 13, 2021
    Posts:
    3
    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
     
  17. RakkuAmiya

    RakkuAmiya

    Joined:
    Jan 9, 2016
    Posts:
    49
    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. :/

    Graeme
     
  18. Del_Passos

    Del_Passos

    Joined:
    Jan 13, 2021
    Posts:
    3
    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.
     
  19. RakkuAmiya

    RakkuAmiya

    Joined:
    Jan 9, 2016
    Posts:
    49
    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
     
    Last edited: Jan 14, 2021
  20. JeffSSVR

    JeffSSVR

    Joined:
    Jan 3, 2019
    Posts:
    3
    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.)
     
  21. RakkuAmiya

    RakkuAmiya

    Joined:
    Jan 9, 2016
    Posts:
    49
    Yeah it stinks really. Can't believe this is such a long-standing bug. I reverted back to the old system and it's all working fine now. Single-pass rendering and no crashes.

    Graeme
     
  22. nocanwin

    nocanwin

    Joined:
    May 7, 2009
    Posts:
    171
  23. p13t3rm

    p13t3rm

    Joined:
    Nov 21, 2013
    Posts:
    16
    Yep, that's the issue I created and linked in my first post. Best of luck dude.
     
  24. nocanwin

    nocanwin

    Joined:
    May 7, 2009
    Posts:
    171
    Dang... I didn't even notice your link. :) I'm gonna stick with the XR management system. I just had to spend extra time upgrading my shaders to support single pass instanced. No crashes now.
     
unityunity