googlevr / gvr-unity-sdk

Google VR SDK for Unity
http://developers.google.com/vr/unity/
Other
2.71k stars 1.09k forks source link

Toggling VR mode broken in Unity 2017.2.0f and Unity 2017.3.0b with latest Google VR Services on Daydream phones #766

Closed dustinkerstein closed 6 years ago

dustinkerstein commented 6 years ago

This is just a cross-post for reference. Mods, feel free to close the ticket. I just wanted to have it posted here so people would be aware.

I found this a couple weeks ago in Unity 2017.3.0b3 but apparently it was also introduced in 2017.2.0b3 and is still reproducible in 2017.2.0f3. Here is the Unity bug for reference - https://issuetracker.unity3d.com/issues/android-daydream-black-screen-after-disabling-and-enabling-vr-mode-at-runtime-with-newest-google-vr-services-update

dustinkerstein commented 6 years ago

Note - This is only reproducible on Daydream compatible phones.

dustinkerstein commented 6 years ago

In case anyone wants to replicate this, here is a test project - https://www.dropbox.com/s/34z0gc5i6zxapy7/DaydreamCrash2017.1.2p2.zip?dl=0 - It is currently configured for 2017.1.2p2 so that you can see it working without issue. But once you upgrade to 2017.2.0f or 2017.3.0b you should be able to easily replicate.

rusmaxham commented 6 years ago

The GVR platform team has traced this to a potential driver issue. We're investigating a workaround at the VR Services level.

dustinkerstein commented 6 years ago

Hey @rusmaxham, just wanted to check in on this one. Did it turn out to be a driver issue?

rusmaxham commented 6 years ago

Yes, it is a driver issue. Our platform team is working with the driver vendor and also trying to develop a workaround they could release in VR Services. I'll post updates here as they develop.

dustinkerstein commented 6 years ago

@rusmaxham Ok cool. I guess I'm just curious how it only affects 2017.2.0x / 2017.3.0x. Does that make sense if it's a driver issue?

rusmaxham commented 6 years ago

It's triggered by either order or timing of GL operations. That's what our platform folks are looking into.

dustinkerstein commented 6 years ago

Just checking in. Any updates on either the Unity or VR Services side of things? There are a few other fixes in 2017.2.0x / 2017.3.0x that I'd like to take advantage of, but I need to hold off until this issue is resolved.

rusmaxham commented 6 years ago

We've narrowed the issue down quite a bit and hope to have a fix soon. The fix will go out in VR Services, so there will be nothing for you to update when the fix is ready. Users will just need the updated VR Services to prevent the crash. When the release goes out, we will post the fixed version number here and if you need, you can have your app check the VR Services version and intent to the Play Store to update VR Services if it doesn't have the fix.

rusmaxham commented 6 years ago

We have a fix for this in Google VR Services that is due out in January. There will be a quick follow release of the GVR SDK for Unity that will have an embedded lib GVR that will also have the fix in it allowing devs to not worry whether users have taken an update to VR Services.

rusmaxham commented 6 years ago

The VR Services fix is now due out in February.

dustinkerstein commented 6 years ago

I just confirmed this is fixed in the latest VR Services update.

It does appear that this update broke something on Unity 2017.1.2p4 when launching the the app with the Daydream View selected - When the app launches, both eyes stay 100% black. I tested Unity 2017.1.3p1 and this issue isn't present so I very quickly just pushed out an update to my app built with this newer Unity version. I'm not sure if this is more on the Unity side or VR Services. Let me know what you think and I'll post a separate issue.

dustinkerstein commented 6 years ago

It seems like the Unity 2017.3.1p1 release which fixes the black eye viewports issue has another, possibly bigger bug that affects all Cardboard devices:

https://answers.unity.com/questions/1456999/google-vr-had-a-fatal-issue-while-loading.html https://fogbugz.unity3d.com/default.asp?990993_b5v2n79co80u7ia6 https://fogbugz.unity3d.com/default.asp?991127_jhl7ggsi3gon4ip4

If anyone has a workaround or knows of a release where both of these issues aren't replicable please let me know.

Update - Cardboard devices appear to be broken in the same way in versions 2017.2.1p4 and 2017.1.3p1 but works in 2017.1.2p4 (and probably some other 3.x and 2.x but I haven't tested). Looking at the release notes of 1.3p1 it's looking like it could be the addition of the Google VR NDK v1.100