Log in or register to post comments

Vuforia Initialization failed

April 16, 2018 - 4:47am #1

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? 

 

 

AttachmentSize
Image icon init errors.png17.77 KB

Vuforia Initialization failed

August 15, 2019 - 4:45pm #9

Please help

Vuforia Initialization failed

April 23, 2018 - 11:34pm #8

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.

We couldnt recreate the issue to debug since it worked well on all the test devices we have used. Ever since Vuforia is integrated within Unity, there were so much of issues starting with a load of camera issues. Is there any way to check and debug this issue?

Vuforia Initialization failed

April 23, 2018 - 6:39am #7

This seems to have been the problem, since i haven't experienced it today yet.

 

Thank you very much!

Vuforia Initialization failed

April 19, 2018 - 6:52am #6

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.

 

If you use the vuforia, webcam, play and do NOT edit any code while playing/testing then it won't break and it all works perfectly.

When you edit some script and unity recompiles while in play mode then vuforia/webcam will break and you will need to restart unity as a workaround.

 

Hope it helps,

Luís.

Vuforia Initialization failed

April 17, 2018 - 12:11am #5

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. 



And i've seen the issue happening from anything from 10 minutes to a couple of hours and can't seem to find a specific thing i did when it broke. So, i'll try to see if i can replicate it.

edit: I tried to use Visual Studio which made no difference. It does seem that when it's running longer then 5 minutes it will break. 

Vuforia Initialization failed

April 16, 2018 - 1:27pm #4

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 don't know if it has anything to do with the webcam, my gut says it had something to do with that but nothing concrete.  

 

 

Vuforia Initialization failed

April 16, 2018 - 7:18am #3

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. But having to restart Unity every half hour is getting on my nerves a bit, so it would enhance my workflow. 



If this is happening because of the webcam i might be able to test with another one.

Vuforia Initialization failed

April 16, 2018 - 6:06am #2

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?  If the webcam is connected via usb maybe try another port.  If it's not interrupting you too much and you're not seeing it on device I wouldn't worry about it too much.



 

Log in or register to post comments