Log in or register to post comments

ios/android black screen after app minimize

November 25, 2014 - 11:49am #1

Hello I'm having issues with the Vuforia AR on ios or android when closing the app and returning to it, sometimes the AR camera will not come back and only displays a black screen. UI still renders fine. Even after getting a black screen, closing and reopening the app 'might' bring the camera back.

Unity 4.5.5f1

Vuforia 3.0.9

xCode 6.1 ( 6A1052d)

 

The below is what I get from xCode on returning to a black screen.

Help fixing this is appreciated. Thank you.

 

targetFinderStop
targetFinderStop
-> applicationWillResignActive()
StopQCAR
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)

markerTrackerStop
imageTrackerStop
cameraDeviceStopCamera
cameraDeviceDeinitCamera
-> applicationDidEnterBackground()
-> applicationWillEnterForeground()
-> applicationDidBecomeActive()
StartQCAR
 
(Filename: /Applications/buildAgent/work/d63dfc6385190b60/artifacts/iPhonePlayer-armv7Generated/UnityEngineDebug.cpp Line: 49)

cameraDeviceInitCamera
2014-11-25 11:11:52.922 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.923 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.923 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.924 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.924 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:11:52.925 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceGetVideoMode
2014-11-25 11:11:52.939 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.959 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.960 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.969 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.971 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:11:52.973 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceSelectVideoMode
2014-11-25 11:11:52.977 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.978 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.978 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:52.979 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:52.979 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:11:52.980 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceStartCamera
markerTrackerStart
imageTrackerStart
cameraDeviceGetVideoMode
2014-11-25 11:11:53.022 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:53.023 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:53.024 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:11:53.025 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:11:53.026 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:11:53.027 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
targetFinderStop
targetFinderStartRecognition
Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 3912.
Total: 17.329958 ms (FindLiveObjects: 2.934583 ms CreateObjectMapping: 0.390375 ms MarkObjects: 13.687583 ms  DeleteObjects: 0.239541 ms)

cameraDeviceGetVideoMode
2014-11-25 11:12:03.234 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:12:03.235 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:12:03.235 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:12:03.236 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:12:03.236 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:12:03.237 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
cameraDeviceGetVideoMode
2014-11-25 11:12:05.152 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:12:05.153 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:12:05.153 bubandu[16455:1956069] DEBUG/AR(16455) UIView has CAEAGLLayer class
2014-11-25 11:12:05.154 bubandu[16455:1956069] DEBUG/AR(16455) UIView does not respond to selector renderFrameQCAR
2014-11-25 11:12:05.154 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
2014-11-25 11:12:05.155 bubandu[16455:1956069] DEBUG/AR(16455) Could not find a UIView with CAEAGLLayer layer class that responds to selector renderFrameQCAR
targetFinderStop
targetFinderStartRecognition
Unloading 0 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 3914.
Total: 16.556250 ms (FindLiveObjects: 1.805166 ms CreateObjectMapping: 0.404208 ms MarkObjects: 14.147208 ms  DeleteObjects: 0.126208 ms)

ios/android black screen after app minimize

February 16, 2015 - 12:09am #9

The script provided in my previous post simply takes care of stopping the QCARBehaviour component (which is handling the camera and tracker initialization) when the App is paused, and re-enabling it explicitly when the app is resumed. The script can be attached to any object n your scene, although a good candidate might be the ARCamera object itself.

 

ios/android black screen after app minimize

February 14, 2015 - 6:32pm #8

HI AlessandroB,

i had try the script u provided, but it seems doesnt work for my android phone.

can u tell me more about the detail how it work?

u always solve my problem.

 

thanks.

chew

ios/android black screen after app minimize

December 15, 2014 - 12:01am #7

Hi slowin,

thanks for sharing your "tip";  however, re-loading a Level  (as you show in your snippet) at each OnApplicationPause, might slow down the resuming;

I think you could give a try to the snippet I suggested in my previous post, as this should be significantly faster (disabling / re-enabling QCAR should take almost no time, while re-loading a full Level might take longer)

private QCARBehaviour qcar;
void Start()
{
qcar = (QCARBehaviour) FindObjectOfType( typeof (QCARBehaviour) );
}
void OnApplicationPause(bool paused) {
if( paused ) {
qcar.enabled = false;
} else {
qcar.enabled = true;
}
}

ios/android black screen after app minimize

December 14, 2014 - 11:36am #6

I'm having this exact problem too, in iOS.

I tried this code, a rate of incident is down.

 

void OnApplicationPause( bool _paused ){
Application.LoadLevel(0);
}

 

same issue...

- https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/black-screen-unity-46

- https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/h-e-l-p-blackout-screen-bug

ios/android black screen after app minimize

December 10, 2014 - 1:10pm #5

Actually, we have code in the app that enables and disables qcar on certain application events, but have found that on Android, qcar does not re-enable properly, so we commented that code out on Android. I was assuming that the resume from background was related to the enabled/re-enabled issue. I am willing to give it a try to only disable on pause, and re-enabled on resume, though.

ios/android black screen after app minimize

December 10, 2014 - 12:52am #4

Have you tried by disabling QCARBehaviour (i.e. stop camera and trackers) on pause, i.e. with some code like:

private QCARBehaviour qcar;

void Start()
{
  qcar = (QCARBehaviour) FindObjectOfType( typeof (QCARBehaviour) );
}

void OnApplicationPause(bool paused) {
  if( paused )
  {
    qcar.enabled = false;
  }
  else
  {
    qcar.enabled = true;
  }
}

?

 

ios/android black screen after app minimize

December 5, 2014 - 8:40am #3

We are seeing this same problem, but only on Anddroid. Unity 4.6.0f3, Vuforia 3.0.9

Anybody find any workarounds to fix this?

ios/android black screen after app minimize

November 25, 2014 - 11:58am #2

+1!!!

 

I'm having this exact problem. 

 

Unity 4.5.5

Vuforia 3.0.9

 

Help Obi-Wan....

 

-Nathaniel Hunter

Log in or register to post comments