Log in or register to post comments

Reloading scene can cause the vuforia camera to fail.

January 21, 2016 - 7:07am #1

 

Hi Guys! 

I've had a problem with my vuforia problems for the past couple of months.

I experience a strange issue (around 20-40% of the time), that causes Vuforia to stop functioning. This results in the render texture and everything else failing, which leaves me with a black screen (with my GUI canvas still being rendered).

 

I have tried formatting, reinstalling, up/downgrading, but the problem persists. Does anyone have any idea why it doesn't work? I need the experience to be consistent, and this requires me to restart the application every single time it happens.

 

I've pasted the output from xcode below!

 

I hope you guys can help me find an answer!

 

 

Unloading 2 Unused Serialized files (Serialized files now loaded: 0)

UnloadTime: 0.643916 ms

Setting BehaviourComponentFactory

Vuforia.ComponentFactoryStarterBehaviour:SetBehaviourComponentFactory()

Vuforia.ComponentFactoryStarterBehaviour:Awake()

UnityEngine.GameObject:AddComponent()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

 

Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 8654.

Total: 2.416958 ms (FindLiveObjects: 0.348541 ms CreateObjectMapping: 0.039125 ms MarkObjects: 1.215250 ms  DeleteObjects: 0.813541 ms)

 

Setting Unity version 5.2.4

QCAR Extension version 5.0.5

Initializing Vuforia...

2016-01-21 16:02:11.101 ARtest2[199:4624] QCAR SDK version 5.0.5

2016-01-21 16:02:11.194 ARtest2[199:4624] DEBUG/AR(199) UIView has CAEAGLLayer class

2016-01-21 16:02:11.194 ARtest2[199:4624] DEBUG/AR(199) UIView does not respond to selector renderFrameQCAR

2016-01-21 16:02:11.194 ARtest2[199:4624] DEBUG/AR(199) UIView has CAEAGLLayer class

2016-01-21 16:02:11.194 ARtest2[199:4624] DEBUG/AR(199) UIView does not respond to selector renderFrameQCAR

2016-01-21 16:02:11.194 ARtest2[199:4624] DEBUG/AR(199) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

Vuforia initialization successful

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

Creating a Mono Camera Configuration (Check for reflection)

Vuforia.VuforiaAbstractBehaviour:ConfigureView()

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

SetHint

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

2016-01-21 16:02:11.195 ARtest2[199:4624] Failed to set hint 'HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS' because the ObjectTracker has not been initialized.

SetHint

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

2016-01-21 16:02:11.195 ARtest2[199:4624] Failed to set hint 'HINT_MAX_SIMULTANEOUS_OBJECT_TARGETS' because the ObjectTracker has not been initialized.

SetHint

Vuforia.VuforiaUnityImpl:SetHint(VuforiaHint, Int32)

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

2016-01-21 16:02:11.195 ARtest2[199:4624] Failed to set hint 'HINT_DELAYED_LOADING_OBJECT_DATASETS' because the ObjectTracker has not been initialized.

dataSetExists

objectTrackerCreateDataSet

Error: Object Tracker not ready. Could not create data set.

Could not create dataset.

Vuforia.ObjectTrackerImpl:CreateDataSet()

Vuforia.DatabaseLoadAbstractBehaviour:LoadDatasets()

Vuforia.VuforiaAbstractBehaviour:Start()

 

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

 

NullReferenceException: A null value was found where an object instance was required.

  at Vuforia.DatabaseLoadAbstractBehaviour.LoadDatasets () [0x00000] in <filename unknown>:0 

  at Vuforia.VuforiaAbstractBehaviour.Start () [0x00000] in <filename unknown>:0 

 

(Filename: currently not available on il2cpp Line: -1)

 

cameraDeviceGetVideoMode

2016-01-21 16:02:11.200 ARtest2[199:4624] VideoBackgroundConfig with screen size of zero received, skipping config step

2016-01-21 16:02:11.200 ARtest2[199:4624] CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.

Reloading scene can cause the vuforia camera to fail.

September 16, 2016 - 2:41am #6

I had experience this on many occassions and find that if I set a flag as follows this issue is resolved.

public void OnTrackableStateChanged(TrackableBehaviour.Status previousStatus,TrackableBehaviour.Status newStatus) {

 

   if (newStatus == TrackableBehaviour.Status.DETECTED ||

    newStatus == TrackableBehaviour.Status.TRACKED ||

    newStatus == TrackableBehaviour.Status.EXTENDED_TRACKED) {

    OnTrackingFound();

   }

   else {

    // seems if I do this then OnTrackableStateChanged will only run OnTrackingLost during this scene and not as a result

    // of this scene unloading to another one

    // stops the unable to set hint, deinitialise tracker etc and allows AR to continue restarting between scenes

    if (!ES2.Load<bool>("LoadingLevel")){

    

     OnTrackingLost();

    }

   }

  }

So if I navigate out to another scene from AR scene I set LoadingLevel to true thus stopping this block from running.  

When the AR is then reloaded on return in Awake() I reset LoadingLevel to false

 

Reloading scene can cause the vuforia camera to fail.

March 10, 2016 - 3:04pm #5

Also, try changing to unity 5.3.2 f1 integration of vuforia and unity is not so well.

Reloading scene can cause the vuforia camera to fail.

March 10, 2016 - 3:01pm #4

Hi, here trying to help: check the available memory, because Unity + Vuforia is a real "expensive" process to the CPU+GPU

Try to be more specific while making tests on different devices, always check all memory is available (all apps closed).

Load only the necessary, and destroy everything (2D/3D assets) that´s not acutually using the app, also turning render mesh off helps.

Regards, and good luck!

Reloading scene can cause the vuforia camera to fail.

March 3, 2016 - 5:26pm #3

Having similar problem here - with same percentage rate of failure (20% - 40% of the time) which makes it even more frustrating since I can't consistently reproduce it.

Have you figured anything out yet?

Reloading scene can cause the vuforia camera to fail.

February 3, 2016 - 12:23pm #2

Nothing? It is a pretty urgent matter - as it keeps us from progressing to the next stages of development?

Log in or register to post comments