Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug After disablling and enabling Virtual reality supported VR doesnt work properly

Discussion in 'VR' started by NewMagic-Studio, May 26, 2020.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    I am getting lots of error like
    NullReferenceException: Object reference not set to an instance of an object
    Valve.VR.InteractionSystem.Hand.OnEnable () (at Assets/SteamVR/InteractionSystem/Core/Scripts/Hand.cs:1263)
    NullReferenceException: Object reference not set to an instance of an object
    Valve.VR.SteamVR_Render+<RenderLoop>d__24.MoveNext () (at Assets/SteamVR/Scripts/SteamVR_Render.cs:139)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
    [SteamVR]</b> GetDigitalActionData error (/actions/Primeval/in/Grip): InvalidHandle handle: 0
    UnityEngine.Debug:LogError(Object)
    Valve.VR.SteamVR_Action_Boolean_Source:UpdateValue() (at Assets/SteamVR/Input/SteamVR_Action_Boolean.cs:353)
    Valve.VR.SteamVR_Action_In_Source_Map`1:ForceAddSourceToUpdateList(SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action_In.cs:207)
    Valve.VR.SteamVR_Action_In_Source_Map`1:OnAccessSource(SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action_In.cs:182)
    Valve.VR.SteamVR_Action_Source_Map`1:GetSourceElementForIndexer(SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action.cs:607)
    Valve.VR.SteamVR_Action_Source_Map`1:get_Item(SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action.cs:573)
    Valve.VR.SteamVR_Action_Boolean:GetStateDown(SteamVR_Input_Sources) (at Assets/SteamVR/Input/SteamVR_Action_Boolean.cs:80)
    SteamVRInputManager:getGrip_Down() (at Assets/Dungeons/Scripts/SteamVRInputManager.cs:279)
    ObjectProperties:HandHoverUpdate(Hand) (at Assets/Dungeons/Scripts/ObjectProperties.cs:328)
    UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
    Valve.VR.InteractionSystem.Hand:Update() (at Assets/SteamVR/InteractionSystem/Core/Scripts/Hand.cs:1297)

    It happened to me several times after disabling and then enable Virtual reality supported
     
    Last edited: May 26, 2020
  2. arfish

    arfish

    Joined:
    Jan 28, 2017
    Posts:
    782
    Hi,

    All the NullReferenceExceptions will probably make your code fail.
    You should check them up first, and fix them.

    If the error is still there, and you think the error is on the Unity side, this is how to best report a bug:
    https://unity3d.com/unity/qa/bug-reporting
     
  3. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,924
    Reading your error messages, this looks like a bug in Valve's code. You should report it to Valve.

    (or ... you made a mistake when following Valve's install instructions)