Log in or register to post comments

Intermittent (but Consistent) Black Screen on First App Load

April 28, 2016 - 5:59pm #1

On "newer" Apple devices, seemingly anything iPhone 6 and above, the Vuforia Unity app I have built for a client is running into a troubling issue on the first load after the application is installed. Vuforia completely fails to initialize (black screen), although it will work just fine if the user quits the app and reloads-- only on the first run does this issue appear. Oddly, it does not do this EVERY time the app is run "fresh", only intermittently.

Based on some threads on the Unity forums and here, I upgraded to the latest version of the Vuforia plug-in, but the issue still appears. I then attempted to upgrade to a newer Unity version, as the app was built with 5.1.2 which is below the current minimum recommended Unity version-- but the issue happens even more frequently on Unity 5.3.1. I have also tried building with both Xcode 7.2 and Xcode 7.3; the issue appears to be worse when built with 7.3, but present on both versions.

When debugging this issue in Xcode, the only differing behavior when it gets "caught" and does not initialize on a fresh install is that Vuforia will "cycle through" some of its start-up function logs (like trackerManagerInitTracker and SetHint) indefinitely.

I do receive a set of warnings/errors after the initialization log that I had been previously unable to diagnose but that might be related to the issue, although it does not seem to "matter" on the iPhone 5 generation devices:

2016-04-28 16:55:13.166 app[434:40359] DEBUG/AR(434) UIView has CAEAGLLayer layer class

2016-04-28 16:55:13.166 app[434:40359] DEBUG/AR(434) UIView does not respond to selector renderFrameVuforia

2016-04-28 16:55:13.166 app[434:40359] DEBUG/AR(434) UIView has CAEAGLLayer layer class

2016-04-28 16:55:13.167 app[434:40359] DEBUG/AR(434) UIView does not respond to selector renderFrameVuforia

2016-04-28 16:55:13.167 app[434:40359] DEBUG/AR(434) Could not find a UIView with CAEAGLLayer or CAMetalLayer layer class that responds to selector renderFrameVuforia

Vuforia initialization successful

 

As far as I could determine this issue is related to the fact that I have my own CustomAppController I use for some app functionality; based on others' findings on the subject, I merged the code from Vuforia's own custom app controller into my own, but these debug statements are the result.

 

I've attached the CustomAppController in full in the hopes that troubleshooting this issue will fix the intermittent failure to initialize; or if anyone has any idea what else could be causing this bug, I would appreciate any insight ASAP as the app is live on the app store (we thought the new version of Vuforia had fixed the issue) and a fast turnaround on this fix is crucial.

AttachmentSize
Package icon CustomAppController.mm_.zip2.71 KB

Intermittent (but Consistent) Black Screen on First App Load

May 11, 2018 - 1:14am #6

Was this ever fixed? Seeing this issue with Vuforia 7.1.34 when we have a canvas component in our unity scene.. (even an empty canvas).. works fine without it!

Intermittent (but Consistent) Black Screen on First App Load

May 11, 2016 - 12:31pm #5

Are you able to reproduce this issue with any of our sample apps (i.e. ImageTargets 5.5.9, etc.)?

Intermittent (but Consistent) Black Screen on First App Load

May 10, 2016 - 5:28pm #4

I have tried both using a preloader scene and loading it in the first scene that appears; same issue in both cases. Following another bit of advice, I attempted to make a check to see if camera access permissions were available prior to loading Vuforia for the first time, but unfortunately that did not help.

The latest version of Vuforia (5.5.9).

The issue appears on iOS 9; I have not been able to reproduce it on iOS 8, but also only have older devices with iOS 8 and below (iPhone 5S, etc).

No other errors, save for the strange behavior I noted where the "normal" logs of setting up image targets, etc. would repeat/loop over and over again when the issue presents itself.

Intermittent (but Consistent) Black Screen on First App Load

May 10, 2016 - 1:28pm #3

  • Is Vuforia being initialized in the first scene of your Unity project or a later scene?
  • What version of Vuforia is being used?
  • What iOS versions on the iPhone devices?
  • Are there any other errors in the Xcode logs?

Intermittent (but Consistent) Black Screen on First App Load

May 2, 2016 - 11:12am #2

As a follow-up, the warnings/errors noted in the original post appear even if I replace my CustomAppController with the VuforiaNativeRendererController. Additionally, there is another error I noticed later on in the Vuforia set-up logs. Note that none of these errors result in a black screen on start, ever, on a test iPhone 5S device; only on iPhone 6 and above is the black screen issue found.

device_SetViewerPresent

2016-05-02 11:06:50.949 drawstaapp[674:95335] ERROR/AR(674) 2016-05-03 11:06:50: CameraDevice::getCameraCalibration(): Failed to get camera calibration because the camera is not initialized.

Log in or register to post comments