"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Vuforia fails to initialize camera

Vuforia SDK Version: 3.0.9 -Description with steps to reproduce:

I have a problem using Vuforia with Unity 4.5.4.

I use an iPad 2 with iOS 8.1.2 and an iPad 3 with 8.1.1 as test devices and on both (and additional test devices my customer uses) I sometimes (about 50% of the cases) I get a black screen instead of the camera background. The app does not freeze, but does not track either. I also tried the Background Texture example and was able to reproduce the error (with a white background as this example inverts camera input). I also tried some of the solutions suggested in other bugs:

I also noted that this part of the app's output seems to be related to the error:

cameraDeviceInitCamera
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceGetVideoMode
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceSelectVideoMode
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceStartCamera
markerTrackerStart
imageTrackerStart
cameraDeviceGetVideoMode
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView has CAEAGLLayer class
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) UIView does not respond to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 10:47:16 hueck3d[9819:1743351] DEBUG/AR(9819) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
-> applicationWillResignActive()

This was from my app, the Background Texture example outputs similar errors:

Dec 16 11:14:15 bta[9856] <Warning>: INFO/AR(9856) 2014-12-16 11:14:15: ImageTracker: Successfully created dataset
Dec 16 11:14:15 bta[9856] <Warning>: *** -[AVCaptureVideoDataOutput setVideoSettings:] - videoSettings dictionary contains one or more unsupported (ignored) keys: (
	    Height,
	    Width
	)
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 11:14:15 kernel[0] <Notice>: AppleH4CamIn::ISP_SelectBestMIPIFrequencyIndex_gated - channel: 0, index: 0
Dec 16 11:14:15 backboardd[56] <Warning>: |GAXGeneral|info| Did verify event: [Substantial Transition did occur]. Outcome: [Error - Session app was nil].
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:15 bta[9856] <Warning>: DEBUG/AR(9856) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
Dec 16 11:14:16 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:16 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:16 bta[9856] <Warning>: DEBUG/AR(9856) UIView has CAEAGLLayer class
Dec 16 11:14:16 bta[9856] <Warning>: DEBUG/AR(9856) UIView does not respond to selector renderFrameQCAR
Dec 16 11:14:16 bta[9856] <Warning>: DEBUG/AR(9856) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR

Any ideas what this may be about and how to fix it?

-Development OS (Mac OS X, Windows, Linux): Mac OS X Yosemite -Mobile OS and Version: 8.1.2 -Mobile Device Manufacturer and Model name: Apple iPad 2 & 3 -Do the Vuforia Sample Applications show the same behavior?: Yes, Background Texture example does the same.

AlessandroB

Tue, 12/16/2014 - 11:43

Hi, thanks for the report.

you mention that you can reproduce this with the BTA sample;

could you please specify the steps you use to reproduce it with the BTA sample ?

Is it upon pausing and resuming the App ? or just at first start ?

 

I didn't even try to pause and resume the app, because my initial problem appeared at start. You have to try several times (I did kill the app using the App Drawer between each try). The iPad 2 seems to have the problem more often than the iPad 3.

We were just testing wild constellations to pin down the error. It seems that if you open the iOS camera before starting the app it seems to work.

I was able to test it on an iPad Mini 2 with 7.0.4. It works here all the time. So it seems to have something to do with iOS 8. I attached my UnityAppController.mm, maybe I did something wrong while follwing the guidelines.

The code seems correct, however, you are not taking any action when the "granted" boolean is FALSE; you have copy-pasted the code snippet from the posted guidelines, but here you should actually "do something" (for example, exit the App or something like showing a dialog to th

It seems to be a timing issue. I added another scene/level to my Unity project which did nothing but loading the actual app level and having an ARCamera running in the background. This level loads very fast and the device camera gets used by the ARCamera.

As I wrote before: This is clearly a timing issue. If Vuforia takes too long to access the camera stream the OS decides to shut the camera down and from that point only delivers a black screen even if the camera access is stopped and restartet using the Vuforia API.

I've done most of my testing after reproducing the issue with the BTA example with the actual app I'm working on. The app is rather large (about 200MB on iOS) and takes some time to load. In this constellation I was able to reproduce the issue every time I start the app.