Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Trouble adding SpectatorView to my project

Hi all,

I have successfully run the sample Unity project, but when I follow all the steps to add SpectatorView to one of my Unity projects I get this error when building the project for the SpectatorView Hololens:

BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at SpectatorView.SV_RemotePlayerManager.GetHeadTransform(IntPtr unityCoordinateSystem, Int32 nsPast, Single& rotX, Single& rotY, Single& rotZ, Single& rotW, Single& posX, Single& posY, Single& posZ)
at SpectatorView.SV_RemotePlayerManager.Update()
at SpectatorView.SV_RemotePlayerManager.$Invoke24(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)

I am using the same Holokit, SpectatorView addon, and CompositorDLL as the sample. I am using Unity 5.5.2 and Visual Studio 2017.

Has anyone has this error? What versions of Holokit and SpectatorView are people having success with?

Thanks,
Jason

Answers

  • Do you have the x86 build of SpatialPerceptionHelper.dll in Assets/Addons/HolographicCameraRig/Plugins/WSA/x86 with the following meta file platform settings:
    1. Included Platforms = WSAPlayer
    2. CPU = x86

  • Hi Jackson,

    Thanks for your advice. I did have the x86 build of SpatialPerceptionHelper.dll in the correct path, but 'Included Platforms' was not set to 'WSAPlayer'. I no longer have the error on build, but my app still does not connect to the sharing service despite outputting this to the console:
    SharingService: Connecting to Server at localhost:20602

    The sample app, which does connect, outputs this:
    SharingService: Connecting to Server at localhost:20602 SharingService: Changing Server to 192.168.42.127:20602... Local IP: 192.168.201.228 Starting the observer. Import Export Manager starting Stopping the observer. SharingService: Connected to Session List Server Setting up 1 worker threads for Enlighten. Thread -> id: 10a0 -> priority: 1 Session conn True sessions: 1 Looking for Default SharingService: Attempting to join session Default at 192.168.42.127:20601 SharingService: Session Join Succeeded

    I'm wondering why my app fails to connect?

  • JasonLPJasonLP
    edited April 2017

    Ok, it turns out the reason it wasn't connecting was because
    connectOnAwake was mysteriously set to false when Connect() was first called. I say mysteriously because connectOnAwake is set to true when it is declared and never set again (AFAIK). The result is that the code setting the server info was skipped, and the connection couldn't be made.

    c++ // Only set the server info is we are connecting on awake if (connectOnAwake) { config.SetServerAddress(ServerAddress); config.SetServerPort(ServerPort); }

Sign In or Register to comment.