Search Unity

Bug "ProfilerRecorder object is not initialized or has been disposed." at launch (XRSystem..cctor)

Discussion in 'XR Interaction Toolkit and Input' started by Oniros88, Sep 28, 2022.

  1. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    I can't launch built client executable. Editor and dedicated server run without issues. Client build freezes after splash screen with this error repeated constantly. It didn't happen in alpha 10.


    InvalidOperationException: ProfilerRecorder object is not initialized or has been disposed.
    at Unity.Profiling.ProfilerRecorder.Stop () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Profiling.Recorder.SetEnabled (System.Boolean state) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Rendering.ProfilingSampler..ctor (System.String name) [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Experimental.Rendering.XROcclusionMesh..cctor () [0x00000] in <00000000000000000000000000000000>:0
    at UnityEngine.Experimental.Rendering.XRSystem..cctor () [0x00000] in <00000000000000000000000000000000>:0
    Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.Experimental.Rendering.XROcclusionMesh' threw an exception.
    at UnityEngine.Experimental.Rendering.XRSystem..cctor () [0x00000] in <00000000000000000000000000000000>:0
    Rethrow as TypeInitializationException: The type initializer for 'UnityEngine.Experimental.Rendering.XRSystem' threw an exception.



    By the way I don't even have XRsystem plugins installed.
     
    MauriceAbi likes this.
  2. VRDave_Unity

    VRDave_Unity

    Unity Technologies

    Joined:
    Nov 19, 2021
    Posts:
    275
    Hey @Oniros88,
    I'll reach out to some folks on our team to see if they can help. In the meantime, can you tell us what version of Unity you are using and what version of URP (Universal Render Pipeline) you are on?
     
  3. Oniros88

    Oniros88

    Joined:
    Nov 15, 2014
    Posts:
    150
    This was in Unity Alpha 11.

    I'm not using URP, this error is happening within HDRP.
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,443
    got same error in build, 2023.1.0a12 + URP 15.0.1 (also using netcode for gameobjects, no xr imported or used)

    *removed URP from project, no more errors in build
     
    Last edited: Oct 1, 2022