Search Unity

Vuforia HoloLens Sample crash on HoloLens but not in Unity

Discussion in 'VR' started by Brisnack, Oct 9, 2019.

  1. Brisnack

    Brisnack

    Joined:
    May 30, 2019
    Posts:
    4
    Hello,

    I'm using Unity 2018.4.10.f1 and i download the Vuforia HoloLens Sample from the Store and imported it into an empy project.
    When i test it in Unity by using my Mac webcam (i'm running windows 10 with Bootcamp) everything work fine: the models like the Astronaut or the Drone are built into the sample images when i show it to my webcam.

    The problems come when i build the project on VisualStudio 2019 and running it on my HoloLens.
    The app opens but i can't see the models when i look at the sample images with the HoloLens.
    Furthemore, while the debugging i get this errors in console:

    Exception generated at 0x76EB2DE2 (KernelBase.dll) in Test.exe: WinRT source error - 0xC00DABE0: "No acquisition device available.".
    cameraDeviceStartCamera


    And when i look at the sample image instead of the models spawning i get this:

    Trackable Astronaut NO_POSE -- UNKNOWN
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    DefaultTrackableEventHandler:OnTrackableStateChanged(Status, Status)
    Vuforia.TrackableBehaviour:RegisterTrackableEventHandler(ITrackableEventHandler)
    DefaultTrackableEventHandler:Start()
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\Windows.Media.Speech.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\BCP47Langs.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\Speech_OneCore\Common\sapi_onecore.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\winmmbase.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\Windows.Globalization.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\BCP47mrm.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\FlightSettings.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\bcd.dll' completato. Simboli caricati.
    onecoreuap\enduser\nui\onecore\sapi\sapi\sr\srcloudpolicy.cpp(255)\sapi_onecore.dll!6405937A: (caller: 640597B1) ReturnHr(1) tid(fe4) 80070005 Access is denied.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\Speech_OneCore\Common\SpeechServiceWinRTApi.ProxyStub.dll' completato. Simboli caricati.
    'Test.exe' (Win32): caricamento di 'C:\Windows\System32\Speech_OneCore\Engines\SR\spsrx_onecore.dll' completato. Simboli caricati.
    Trackable Drone NO_POSE -- UNKNOWN
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:Log(Object)
    DefaultTrackableEventHandler:OnTrackableStateChanged(Status, Status)
    Vuforia.TrackableBehaviour:RegisterTrackableEventHandler(ITrackableEventHandler)
    DefaultTrackableEventHandler:Start()
    (Filename: C:\buildslave\unity\build\Runtime/Export/Debug.bindings.h Line: 45)


    Furthermore, if i launch the app on the HoloLens withouth running it on VisualStudio i can see the splash screen and the app close.
     
    Last edited: Oct 9, 2019
  2. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    408
    So this is just a guess, but did you enable the all UWP Capabilities (Permissions) in your VS project? In addition to Webcam and Microphone, you may need to add enable "Gaze Input", which is a new Capability.

    The error "No acquisition device available." seems to indicate the app cannot access the camera or some other device; possibly due to missing app permissions.
     
  3. ekarlia

    ekarlia

    Joined:
    Jan 28, 2020
    Posts:
    5
    Hello @timke (& @Sika_MC )

    I also got some issues with Unity, Vuforia and HoloLens...

    I want to create an app in Unity where I want to use both Mixed Reality Toolkit (MRTK v2) and Vuforia (only ImageTargets).

    I manage to get the Vuforia Sample to work and successfully deploy to HoloLens 1 through Visual Studio, but I can't create an own new project in Unity with ImageTargets.

    The supported Vuforia Engine was downloaded together with Unity. I have created a new Unity project and imported MRTK v2. I just want to create a simple scene to get the ImageTarget-functionality to work, so I have an AR camera, an image (from my DB which is created and downloaded from Vuforia Developer Portal) and a 3D object above the image. The build on Unity succeeds without any error messages, the same for Visual Studio to the HoloLens. Might also be worth to mentioning that I deploy the app to HoloLens remotely.

    The problem is that the app crashes directly after the deployment. It last at maximum of 3 seconds before the whole app crashes in HoloLens.

    I really don't understand why? The same thing happens regardless of whether I use MRTKv2 or not.

    Unity: 2018.4.16f1
    Visual Studio Community 2019: 16.4.2
    Vuforia: 8.3.8

    Thank you in advance!
     
    Last edited: Feb 13, 2020
  4. timke

    timke

    Joined:
    Nov 30, 2017
    Posts:
    408
    We need a crash dump in order to identify the problem. Please refer to Microsoft's documentation on debugging HoloLens apps and collecting crash dumps:
    https://docs.microsoft.com/en-us/visualstudio/debugger/using-dump-files?view=vs-2019
    https://docs.microsoft.com/en-us/wi...ing-the-windows-device-portal#app-crash-dumps
    You can also try debugging yourself by launching the app using Visual Studio, i.e. using F5.

    Finally, I strongly recommend you seek help from Microsoft's "HoloDevelopers" Slack channel, which you can join via this link: https://holodevelopersslack.azurewebsites.net/
    They will be able to better help with MR specific issues.