Problem with "Sharing" (taken from the Holograms 240 sharing sample)

Hello,

for my two hololenses I did the Holograms 240 sample / tutorial.

That worked good, both hololenses in my wlan Network worked together with the sharing Service.

I have my own Project which can load and Display a mesh like a machine or something, and place it, rotate it scale it an so on.

I want to have a Feature, that the second hololens with my app can see what the first hololens with the app sees (and does).

So I copied the HoloToolkit-Sharing-240 Folder into my app under my assets Folder.
Was that okay or should I have used something else?

I added the Sharing Prefab to my Project hierarchy. I placed the correct IP in it’s sharing stage script.

I added the ImportExportanchorManager to my gameobject containing my mesh.

I opened the unity Player Settings and checked all Client and Server capabilites.

First I start the Service for the sharing from my unity. It starts okay.

When I start my app in unity itself, it says “SharingService: Session Join Succeeded” in the log.
So this works or at least Shows no error, in the sharing Service I can see the Client connected.

When I build and create the solution for VS2015 for universal and hololens, and open the solution with visual Studio, I get an error message of “Unsafe Code” now. So I opened the Project properties in visual Studio and checked “Allow unsafe Code”.

Now I can build and start on my hololens. But in the sharing Service window I can see the Client does not connect or at least nothing happens here.

When I look at the visual Studio Output it says

Exception thrown: ‘System.DllNotFoundException’ in Assembly-CSharp.dll
Exception thrown: ‘System.TypeInitializationException’ in Assembly-CSharp.dll
Exception thrown: ‘System.TypeInitializationException’ in Assembly-CSharp.dll
TypeInitializationException: The type initializer for ‘Academy.HoloToolkit.Sharing.SharingClientPINVOKE’ threw an exception.
at Academy.HoloToolkit.Sharing.SharingClientPINVOKE.new_LogWriter()
at Academy.HoloToolkit.Sharing.SharingStage.Awake()
at Academy.HoloToolkit.Sharing.SharingStage.$Invoke3(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)

Any idea what I did wrong or what I am missing? Help would be great, thanks a lot!

Hello,

I removed the sharing stuff from my Project, deleted the HoloToolkit-Sharing-240 Folder from my assets.

I downloaded the latest Hlotoolkit from here:

Then I added the Holotookit Folder /Assets/Holotoolkit Folder to my Assets Folder.
And the External Folder to my Projects Folder.

Again I added the Sharing prefab to my Hierarchie and set the correct IP.

I started the sharing service, created the build for universal and hololens for my visual Studio solution, started the visual Studio solution on the hololens and again I get this error:

Exception thrown: ‘System.DllNotFoundException’ in Assembly-CSharp.dll
Exception thrown: ‘System.TypeInitializationException’ in Assembly-CSharp.dll
Exception thrown: ‘System.TypeInitializationException’ in Assembly-CSharp.dll
TypeInitializationException: The type initializer for ‘HoloToolkit.Sharing.SharingClientPINVOKE’ threw an exception.
at HoloToolkit.Sharing.SharingClientPINVOKE.new_LogWriter()
at HoloToolkit.Sharing.SharingStage.Awake()
at HoloToolkit.Sharing.SharingStage.$Invoke4(Int64 instance, Int64* args)
at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
(Filename: Line: 0)

What am I missing? Thanks a lot!

You might be missing enabling the internet client and internet server in the publishing settings in the app, you can change this in the unity editor. Hard to say because the call stack doesn’t seem to really narrow much down other than the functions throwing the error.

I have set the Capabilities. That’s not the Problem. I will try to find out more.
In Build Settings “Publish Settings” and “Other Settings” look like in the HolographicAcademy-Holograms-240 Sample, which is running well. The IP in the sharing component is also okay and the same.

There seems to be some DLL missing or at the wrong place?

Unknown, this might be a question for the guys on the HoloToolKit git hub since this is a 3rd party project.

1 Like