QCAR initialization failed

June 9, 2015 - 2:50am #1

This is happening in the editor. Unity 4.6.x

It is happening in multiple Vuforia 4.x projects. Most of which are pretty typical setups. It happens about once every 20 starts so during development I see it all day, every day. Never happened before in 3.x or 2.x

These projects are not deployed (in their upgraded forms) so I have no information about devices. This happens often enough (at my home setup and at my office setup) that I'm sure your devs see it in their own tests. Is it just a harmless thing that happens in the editor, but not on devices?

Repro: Have a Unity project with Vuforia 4.x. Press play. Most of the time, no issue. Sometimes, this happens:

QCAR initialization failed:
UnityEngine.Debug:LogError(Object)
Vuforia.DefaultInitializationErrorHandler:SetErrorCode(InitError) (at Assets/Qualcomm Augmented Reality/Scripts/DefaultInitializationErrorHandler.cs:84)
Vuforia.DefaultInitializationErrorHandler:OnQCARInitializationError(InitError) (at Assets/Qualcomm Augmented Reality/Scripts/DefaultInitializationErrorHandler.cs:161)
Vuforia.QCARAbstractBehaviour:Start()

If this is something that will also happen on devices, then what is some useful code I could put in the DefaultInitializationErrorHandler to make it try again instead of what it does now.

 

QCAR initialization failed

June 12, 2015 - 6:36am #7

I came across this several times today and actually stumbled onto a way to make it happen in a repeatable way. I kind of didn't believe it though. Seems too voodoo-ish, but I could do it at least 10 times in a row. When I have time next week, I'll dig into this with a fresh project and post back to here.

QCAR initialization failed

June 11, 2015 - 10:57am #6

I experienced the same random QCAR Init error myself once yesterday when entering PlayMode (Unity 4.6.5f1; Vuforia 4.0.103). I haven't been able to reproduce it on demand. When it happened yesterday, I think I was making several changes in quick succession and perhaps something wasn't quite in sync or ready as PlayMode was initializing. The next attempt to start PlayMode was successful. I haven't experienced this on any device.

QCAR initialization failed

June 9, 2015 - 11:30pm #5

Vuforia 4.2.3

It happens across most of our projects. Some of which are little more than testcase apps. Throw an ARCamera and ImageTarget into an empty app...eventually you'll see the error. All of which don't have this behavior in 3.x or 2.x

Voodoo observervation: It seems to come and go. Some days I don't see the error. Some days I see it several times. A few times I've tried to retrace exactly what I did before, but it doesn't seem related to anything apparent.

More info that might be helpful: I build with Unity set to Android. So if you have code inside (I imagine you do), that does one thing where it's iOS/editor and another thing where it's Android/editor...then we'd be looking at the Android side.

So far haven't seen any issue on an actual device, but stuff like that worries me. Vuforia 3.x had a few issues in editor that were known to be safe to ignore. Just need to identify which side of the fence this is on.

QCAR initialization failed

June 9, 2015 - 10:49pm #4

Could the version really affect if it works on some occasions? I would think that it is black or white. 

QCAR initialization failed

June 9, 2015 - 10:46pm #3

My two cents on this. It could be that your code relies on other action to be done in Start/Awake. 

Consider you have script A that initializes some stuff and B that uses them (DataSet for instance).  On run 1, unity grabs script A in Awake and then script B and all goes fine. But next round something was changed or moved and now script B is initialized first but what was expected to be done is no more.

I only use Awake/Start when the script does internal action, when I have one script interacting with another I call the Init method from a controller.

May not be related though...

QCAR initialization failed

June 9, 2015 - 5:56pm #2

What specific version of the 4.x Vuforia SDK are you using?

Log in or register to post comments