Log in or register to post comments

Camera frozen on application restore

October 16, 2017 - 2:04am #1

Hey everyone,

I've noticed this issue appearing occasionally on some android devices (Pixel and Galaxy S8).

Sending the application to the background, waiting several minutes and then restoring the application. Causes the camera to show a single frame and then stop updating. I have attempted to restart the camera (CameraDevice.Instance.Stop, CameraDevice.Instance.Start) upon restoration along with restarting Vuforia by toggling the behaviour on and off. This appears to have no effect.

As far as I can see the application is still receiving frames from the camera but it is just not updating the background for some unknown reason. 

Has anyone seen this issue before? Am I missing something for debugging?

Any ideas?

 

Cheers,

Danny

Camera frozen on application restore

November 6, 2017 - 12:22pm #8

I'm seeing what appears to be a similar issue in Unity 2017.2.0f3 (Vuforia 6.5.22 built in) on a Samsung Galaxy S8 (Android 7.0). In this case the frozen camera seems to occur after the device is put to sleep while the app is running. Upon waking the device, the camera displays a single, darkened, frame and will not activate again until the application is exited and restarted. No USB connection to the phone at time of testing. This doesn't happen on a Samsung Galaxy Tab S2 also running Android 7.0. Any advice or workarounds? Thanks.

Camera frozen on application restore

October 30, 2017 - 5:00pm #7

I was able to reproduce this issue while disconnected from USB + ADB. The bug is fixed in a patch for Vuforia 6.5. I will post here when the patch is available.

Thanks,

-Vuforia Support

Camera frozen on application restore

October 26, 2017 - 2:42am #6

It also occurs on the samples. Make sure you disconnect the phone from any USB and don't have ADB connected for logging. For some reason it only shows itself then. 

Camera frozen on application restore

October 26, 2017 - 2:03am #5

Hey,

The issue is sporadic at best. It seems that if you send the application to the background for several minutes and then restore it, it takes one frame from the camera and then drops all other frames. It then appears to recover at a random point in the future, or not at all.

I'll attempt to reproduce with the samples however from a quick look at the code it doesn't look like you have anything explicitly used after restoring the application from the background apart from setting the camera focus mode?

Camera frozen on application restore

October 24, 2017 - 10:47am #4

I have tested this on the Pixel using the Core Samples with Unity 2017.2.0f3 and was unable to reproduce the issue. Could you try and reproduce this within our samples?

Additionally, are Stop and Start the only calls you're using when restarting the Vuforia Camera? If you look in CameraSettings.cs in our samples, the RestartCamera function will show you the proper order of function calls for restarting the camera.

Thanks,

-Vuforia Support


Camera frozen on application restore

October 19, 2017 - 7:51am #3

Hey,

Yes, they are the only devices that seem to be affected, Unity 2017.2.0f3

Camera frozen on application restore

October 17, 2017 - 10:53am #2

Hello Danny,

Which version of Unity + Vuforia are you using? Are those the only two devices you are seeing this issue on?

Thanks,

-Vuforia Support

Log in or register to post comments