Search Unity

Resolved Can't debug on HL1; missing WindowsMRXRSDK DLL?

Discussion in 'VR' started by JasonC_, May 21, 2021.

  1. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    Unity 2020.3.8f1, project configured to use Windows MR XR plugin on UWP builds. Hololens 1, debug build x86, in Visual Studio, try to run on Remote Machine (to the HL1), deploys with no errors, window opens on HL1 but is blank, application fails to start with last error in log:

    Code (csharp):
    1. Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'WindowsMRXRSDK': The specified module could not be found.
    2.   at UnityEngine.XR.WindowsMR.Native.GetOriginSpatialCoordinateSystem () [0x00000] in <00000000000000000000000000000000>:0
    3.   at UnityEngine.XR.WindowsMR.WindowsMREnvironment.get_OriginSpatialCoordinateSystem () [0x00000] in <00000000000000000000000000000000>:0
    Can't debug.

    What can I do? Out of ideas.
     
  2. darkdescendant

    darkdescendant

    Joined:
    Feb 8, 2019
    Posts:
    5
    What version of WMR XR Plugin are you using?
     
  3. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    And can you strip down you project to a very small one that you can zip up and send us?
     
  4. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    Windows XR Plugin
    Unity Technologies
    Version 4.4.2 - March 31, 2021
     
  5. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    Yes, I will have to do it later this evening or tomorrow AM (GMT -4).
     
  6. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    In the VS project folder that you generated can you confirm that you have the x86 dll (<root>\<project_name>\Plugins\X86\WindowsMRXRSDK.dll)?
     
  7. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    I can not reproduce the issue. Let's table this.

    I updated to 2020.3.9f1 with WMR XR 4.5.0. I cannot find a build configuration / workflow that leads to the missing DLL. I cannot say if this is a consequence of that update.

    It's possible that the original was some transient build/deploy issue. At the time the issues were occurring, I was under significant stress and rather hand-wavily installing and uninstalling packages, switching builds around, and throwing various debugging tools at it. Anything could have happened.

    ---

    As a note, though -- possibly (probably) a red herring -- I *have* noticed random sets of build and deploy issues all around strongly correlated with the act of closing or opening an MSVC instance while Unity or another MSVC instance has a build/deploy in progress. I believe the original issue involved this action, and I've seen other random things, e.g. app manifest parse errors on Build & Run to remote device from within Unity, random build failures, etc.

    Unsure if that's significant, but just putting it out there.

    ---

    In any case, I am satisfied to call this a temporary system configuration issue, or user error, for now. I will post back here if I ever run into this issue again, hopefully with better info on reproducibility.

    I don't know what the etiquette is around here but I am changing the title prefix to "Resolved" for the time being.
     
    Last edited: May 23, 2021
  8. JasonC_

    JasonC_

    Joined:
    Oct 27, 2019
    Posts:
    66
    Unfortunately, I've since deleted the build folder that existed when the issues were occurring. Currently (with the other comment I just posted in mind), I can confirm that that DLL is present, for all combinations of build settings that I tried.

    Appreciate your prompt replies.
     
  9. joejo

    joejo

    Unity Technologies

    Joined:
    May 26, 2016
    Posts:
    958
    Thank you.