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.
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