PTCInc / vuforia-engine

Bug and feedback issue tracker for the Vuforia Engine SDK
https://developer.vuforia.com
19 stars 0 forks source link

Failed to start Vuforia with MRTK3 | Hololens2 #98

Closed BenjaminGerbe closed 3 months ago

BenjaminGerbe commented 3 months ago

Summarize the bug: Vuforia won't start with mrtk3 on Hololens2

Observed problem I'm trying to use the target image of Vuforia for a Hololens2 project with MRTK3. I following the workaround for mrtk3 suggested here, (add Vuforian Behaviour and default Error Handler on the camera, and pass 0 to Camera Offset). But this only works in the editor and in UWP for intel, which I run on my computer.

Expected result In the case of a target image, the target should be tracked and render representation or virtual object for exemple.

Other observations I suppose that since it works in the editor and in intel UWP, the source of the problem is may be the configuration of my project? I'v tried to follow the documentatation, but since it has'nt been updated for mrtk3 some stuff have changed.

Reproducible steps I'm basicly just with a clean Unity 2022.3.18f1 project with Vuforia 10.21.3 and MRTK3

Affected Vuforia Engine version: 10.12.3

Affected platform:

Affected device:

Screenshots / Video Recordings

Affected database

Device or platform logs The UnityPlayer.log :

Vuforia Initialized
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Vuforia.Internal.Utility.UnityLogger:LogInfo(String)
Vuforia.Internal.Utility.Log:Info(String)
Vuforia.Internal.Core.Engine:InitOnCameraReady()
Vuforia.Internal.ExternalCamera.NullExternalCamera:Init(Func`1)
Vuforia.Internal.Core.Engine:<Init>b__160_0()
Vuforia.Internal.Core.EnginePermissions:OnPermissionRequestFinished(Boolean)
Vuforia.Internal.Core.EnginePermissions:RequestPermissions()
Vuforia.Internal.Core.Engine:Init(String)
Vuforia.VuforiaApplication:Initialize()
Vuforia.Internal.Core.OneTimeInitialization:Initialize()

[....]

Failed to start Vuforia
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Vuforia.Internal.Utility.UnityLogger:LogError(String)
Vuforia.Internal.Utility.Log:Error(String)
Vuforia.Internal.Core.Engine:Start(Action)
Vuforia.Internal.Core.Engine:Start()
Vuforia.VuforiaBehaviour:AfterVuforiaInitialized(VuforiaInitError)
System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
System.Delegate:DynamicInvokeImpl(Object[])
System.MulticastDelegate:DynamicInvokeImpl(Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Core.Engine:add_OnAfterVuforiaInitializedPublic(Action`1)
Vuforia.VuforiaBehaviour:Awake()

Failed to start Vuforia
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogError(Object)
Vuforia.Internal.Utility.UnityLogger:LogError(String)
Vuforia.Internal.Utility.Log:Error(String)
Vuforia.Internal.Core.Engine:Start(Action)
Vuforia.Internal.Core.Engine:Start()
Vuforia.VuforiaBehaviour:OnEnable()

Workaround I don't find a Workaround.

Additional comments I know that MRTK3 is not currently supported by Vuforia, but since you mentioned an workaroud here, I just encountered the bug when tried to test it.

ptc-epassaro commented 3 months ago

Hi @BenjaminGerbe, thank you for your report. We cannot reproduce the issue on our side, and unfortunately the Unity logs are not very descriptive in this case. Can you please try to follow the instructions in this page to get the logs from Vuforia Engine and post those here? This might give us more information on exactly why it fails to start.

Also, which is the exact version of Windows Holographic installed on your device?

The only potential issues I can see in the Unity log are these lines:

The referenced script (Unknown) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object '<null>') is missing!

Which make me think there might be something missing in the setup of your scene.

BenjaminGerbe commented 3 months ago

Thank you for your quick reply. I tried to recreate the problem with another project and surprise, it works! I'm linking the csv file of the event you're asking about: EtwTrace.csv

Apparently it can't initialize the default camera device.

Actually I think it's more a deployement error, the first time I deployed via Unity and the Device Portal, and I don't remember if the application asked me for the right to use the camera, maybe that explains why it couldn't initialize it. Now I use deployment from Visual Studio and it works fine.

Sorry to have bothered you.

ptc-epassaro commented 3 months ago

Hello @BenjaminGerbe, thank you for the update and great to know that it works!

No problem at all! Always feel free to let us know if you encounter any issue and we'll be happy to help.