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:
- Black Background Object render echosDoes not fit, because I don't have render echoes and I didn't change Clear Flags.
- Cannot see camera's view (Unity+iOS)Seems to be the same as above.
- Background Texture Access iOS 8 Black ScreenThis one is similar (although I don't have to suspend the app to background to get this error). But there is no solution.
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.
Vuforia fails to initialize camera
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 ?
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
if you open the iOS camera before starting the app it seems to w
Vuforia fails to initialize camera
Yes, I use the default camera app. This only works if you open it directly before opening my app.
Vuforia fails to initialize camera
Is it possible that the camera has a timeout which triggers it t
Vuforia fails to initialize camera
I know the link you posted and I used an implementation of these guidelines.
Also Camera access is granted (the entry in the Privacy settings has the green switch). Otherwise there would be no camera at all, so this is not the case here.
Vuforia fails to initialize camera
OK, so, in this case, let me try to reproduce using the BTA sample;
starting / killing / restarting the app multiple times should trigger it at some point , according to your previous description ?
Vuforia fails to initialize camera
Yes. I was able to reproduce it this way. Please note that the propability seems to vary with the device you are using. Our iPad 2 exposed this error more often than our iPad 3.
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
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
Vuforia fails to initialize camera
Unfortunately this didn't fix it. Is the error message in log I posted in the first post of any use?
Vuforia fails to initialize camera
In this case we'll just have to try and reproduce it here. I will let you know.
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
I have tried to reproduce this on iPad mini on iOS 8.1.2, with the BTA sample as we said, using the steps:
- start app
- kill app
- restart app
- repeat steps above several times
But I could not reproduce it.
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
I understand.
Vuforia fails to initialize camera
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.
Vuforia fails to initialize camera
Some updates from our testing:
Vuforia fails to initialize camera
As an additional info:
is your Unity project setup also relying on the use of multiple cameras (e.g. one ARCamera and one Background Camera) like in the BTA sample ?