Once in a while Vuforia crashes with the following errors:
NullReferenceException: Object reference not set to an instance of an object Vuforia.VideoBackgroundBehaviour.OnPreRender ()
NullReferenceException: Object reference not set to an instance of an object Vuforia.VideoBackgroundBehaviour.OnPostRender ()
If i restart the app, i get the screen that can be seen in the attached file. This seems to be generated by the DefaultInitializationErrorHandler. And when removing that script it just stays black. It will also output the following errors :
Vuforia initialization failed UnityEngine.Debug:LogError(Object) Vuforia.VuforiaRuntime:InitVuforia() Vuforia.VuforiaRuntime:VuforiaInitialization()
Vuforia initialization failed: INIT_ERROR
INIT ERROR
Failed to initialize Vuforia. UnityEngine.Debug:LogError(Object) DefaultInitializationErrorHandler:SetErrorCode(InitError) (at Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs:163) DefaultInitializationErrorHandler:OnVuforiaInitializationError(InitError) (at Assets/Vuforia/Scripts/DefaultInitializationErrorHandler.cs:23) System.Delegate:DynamicInvoke(Object[]) Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[]) Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action`1, InitError) Vuforia.VuforiaRuntime:InitVuforia() Vuforia.VuforiaRuntime:VuforiaInitialization()
Vuforia cannot be started before it is initialized. Please disable Delayed Initializationin the Vuforia configuration or initialize Vuforia manually with the VuforiaRuntime-class. UnityEngine.Debug:LogError(Object) Vuforia.VuforiaARController:Start() System.Delegate:DynamicInvoke(Object[]) Vuforia.DelegateHelper:InvokeDelegate(Delegate, Object[]) Vuforia.DelegateHelper:InvokeWithExceptionHandling(Action) Vuforia.VuforiaBehaviour:Start()
(i'm not using delayed initialization)
This seems to be a problem with the Unity editor and Vuforia since it fixes itself when restarting Unity. Is there anything that might be causing this behaviour or is there a specific version of Unity i need to use?
I sometimes see this message
I sometimes see this message too but only in the editor and only every once in a while and a Unity restart fixes it. Might have to do with Unity's ability to talk to the webcam. Do you have another program that is using the webcam?
As far as i know nothing else
As far as i know nothing else is using the webcam. It's an integrated webcam so unfortunately i can't really plug it into a different port. And i do agree that it's not that much of an interference.
Every half hour seems a bit
Every half hour seems a bit much. I see it like once a week. Do you have a lot of native plugins? Maybe pull them out of your project and see if it helps.
I'm not using any native
I'm not using any native plugins as far as i know of. And the only library that i use is powerui. I am developing most of the time in the Rider ide though. So i'm going to work in Visual Studio today, to see if that might fix the issue and report back.
My tests have shown that
My tests have shown that vuforia breaks this way when you edit code/script while in Play Mode! Then the next time it will say vuforia failed to initialize.
This seems to have been the
This seems to have been the problem, since i haven't experienced it today yet.
Thank you very much!
Hi, The same issue was
Hi, The same issue was reported to us by a Customer also on an android app we have made using Unity. So this is not an issue only with the editor.
Please help