Cardboard (and hybrid 2D+Daydream) apps crash on S8 when screen resolution is not WQHD+ (Switching Between VR.enabled cause crash) #671
Comments
Update, On Unity 2017.1.0f3 same issue |
Update, On my old Fly IQ4516 everething works fine. |
Hi VadimTikhonyuk, can you attach a full log for this crash? |
I have the same use case and what appears to be the same problem. Phone: Samsung Galaxy S8 Plus
I put Debug.log strings in the code so you can see it in the logcat output more easily. Some things of note: The game does not crash on my old handset which is an LG G2. Building with a mono back end or using IL2CPP makes no difference. Crash is the same. I attached the logcat for the crash so you can check it out. |
Hi, tedruxpin, |
On S8+, can you let us know if the Cardboard app runs correctly (no crash) when you set the phone's screen resolution to the native device resolution: Settings > Display > Screen resolution > WQHD+ > APPLY |
I have the same problem with a S8. @fredsa : I made the test you asked for. Here's the results, with the latest Google VR Services update :
|
@fredsa There have any way to open native settings and give user to change resolution. Similar to how this work in Gear VR. I have some skills in writing plugins on java |
@Pseudopode, thank you for confirming and sharing your results with WQHD+ and FHD+. The behavior you're seeing when deactivating Google VR Services is expected as this service is responsible for entering VR mode, which includes enabling Low Persistence mode, which helps greatly with user comfort and image quality. |
@VadimTikhonyuk We're looking into this underlying issue. If in the mean time you have a workaround, please feel free to share here. |
Hi, is there any progress? We are having the same issue, instant crash on S8/S8+ when using non-native resolution. It would be really wonderful to get a fix asap. Or is there a way to force user or Android to always switch to native resolution before staring an app? |
One possible workaround is to add |
Using a test apk, built using Unity 2017.1.0p4, it appears that it's not quite enough to use Although this does prevent the app from immediately closing when it's launched at a less than full screen resolution, the result is that the stereo output is rendered at the wrong scale. |
We're looking into a couple of potential routes to fix this issue:
|
Thank you for response.
Could anyone please point me to the root cause of the crash? Is it GVR SDK, GVR service or Unity Player causing this? Thx. |
We get the same reports from users with S8+. If it is WQHD it works fine, if not it crashes during switch from 2D to VR. Since the app starts 2D we don't have info on what happens during switch from VR to 2D. |
Same on the Samsung Galaxy Note 8, I'm starting in "none" standard mode and loading Cardboard later, at that point crashes out if the device is in FHD+ 2200x1080 mode, change the device to WQHD 2960x1440 and is fine. Log:
|
Just wanted to check up on this issue as I'm getting more and more reports from users of this crash. This is likely affecting the majority of S8 / S8+ / Note 8 users as those devices ship from the factory at FHD. I was thinking about pushing out an update to my app that warns these users and prevents VR mode, but since I have the "daydream" VR device as the first in the list (and needs to stay this way for Daydream approval), my app will crash immediately at launch since it loads in VR mode from the beginning. If anyone has a workaround or insight as to when this might be fixed, I'd very much appreciate it. |
It is becoming to be a really pressing issue, especially for developers who have their apps already on Google Play. Bad reviews could bury their apps, nobody cares it's not their fault. I just hope they will be able to fix it via GVR Services update which should be released at the end of this month. If not, then I'll have to do some ugly workarounds. Also, IMHO, VR (or any app) should keep the resolution user has selected and shouldn't try to switch to native. Software should respect users settings, not override it. This problem shouldn't exist. |
We're actively working on a fix for this issue. In the mean time the best available workaround is to have users change their device's default resolution to WQHD+: Settings > Display > Screen resolution > WQHD+ > APPLY |
Thank for the update @fredsa Do you happen to know if it's going to be a fix to VR services or Unity? Any ETA? Asking users to switch resolutions isn't really practical as I have no way to reach out to them, and in my case the application crashes immediately at launch so I can't warn them at all. |
Is there an ETA of less than a few days or will it be longer? Just want to know if it is worth working on a "detect and ask S8/S8+/Note8 users" system and pushing it out, or if this fix will come soon. |
Just a quick note - I believe this bug will result in all Daydream Unity apps crashing on startup when set to FHD (the default resolution) on S8 / Note 8 devices, at least on the Unity / VR services versions where this bug exists. Please let me know if I can help at all. I'm happy to test any potential fixes or workarounds as this is a bit of a showstopper for me at the moment. |
@GavinThornton It will very likely take longer than a few days. |
Just wanted to check in. Any news from the Samsung / Unity / GVR side of things? |
@dustinkerstein: Unity 2017.1.2p1 "XR: Fixed handling of Android density (screen resolution) changes to avoid a crash."
|
A fix for this is also coming to Unity 5.6.x. |
@OmegaMule Nice! I just confirmed this is working correctly in 2017.1.2p1 for both FHD+ and WQHD+ resolutions. Toggling VR mode also works correctly. |
OK I've tested the crashfix change on Unity 2017.1.2p1 and Unity 5.6.4p1, the result is as I've predicted. Unity devs just added "density" to Android Manifest, which prevents the crash when GVR Services enforce resolution change. The scaling, however, is still not fixed. VR viewports are incorrectly scaled and positioned due to resolution difference. So this is just first step. Users still need to change resolution to WQHD to use Cardboard. Is there any ETA for the scaling fix? Thanks. Update: |
@OmegaMule Can you post a screenshot of that? I haven't seen that when testing on the devices here - http://developer.samsung.com/remotetestlab/rtlDeviceList.action |
@dustinkerstein: It looks exactly like that on real Galaxy S8 device and clean Unity version I mentioned before. Update: |
@OmegaMule Interesting, I am not able to replicate that behavior with my app when testing on the Samsung Remote Device lab (which I believe are in fact real devices, not emulators or simulators). Is it possible to post your project online? |
The plan is to push an updated Google VR Services build to resolve the second half of the problem (properly responding to "density" changes when declared in the manifest). We expect the rollout to hit 100% by the end of next week (Nov. 3). |
The fix to allow "density" changes without an app restart (by way of the app manifest) has rolled out to 100%. Note that the resolution change will still occur if the user has not explicitly changed the resolution to native. Separately, we're exploring rollout of a global prompt to change the resolution of the device to native, sometime in December. That will avoid the resolution switch entirely, though it may be suboptimal for some users who don't want their device always running at native resolution. |
The fix for this issue requires Unity 5.6.4p1, 2017.1.2p1, and 2017.2.0f3 and VR Services 1.10.172754103 or later. |
I can confirm that the combination of Unity 2017.1.2p1 and VR Services 1.10.172754103 is successful. What's the best way to detect if a user doesn't have the latest VR Services installed though? |
I ended up using the PackageManager to get the PackageInfo for com.google.vr.vrcore. Then I checked the versionCode to make sure it was at least 160729830 (aka 1.10.172754103). If there's a better way then please let me know. Thanks. |
You can also now upgrade to the latest Google VR SDK for Unity (v1.110) which has the Android GVR lib v1.101 embedded in the .unitypackage. This embedded GVR lib has the fix in it and should work even if the user hasn't upgraded their VR Services. |
Awesome. That works. Thanks! |
Hi, I'm still getting the same problem (crash on start when not in WQHD+) with Samsung S8, Google VR Services 1.10.172754103, Unity 2017.1.2f1, Google VR SDK for Unity (v.1.110) Other than importing the latest Google VR SDK to my project is there anything else I need to do to make it use the VR lib? Not sure how Unity knows to use the one in the SDK instead of it's own built-in library. |
Ok, requires Unity 2017.1.2p1 it seems not working with 2017.1.2f1 |
When I turn off Google VR Service, my vr app works. But When I turn on Google VR Service in applicatioon ->vr helper etc, my app doesnt work.
" How can i avoid this problem on s8 and cardboard sdk 0.8? |
@hyenachi Version 0.8 of the Google VR SDK for Unity is very old. If you encounter any issues with the latest SDK, please file a new issue for that. |
I can not currently upgrade Unity and the SDK on our project but have hit this annoying bug. Can I fix the crash at least with a manifest update like android:configChanges="density" then? |
You can try, though I don't believe the behavior will be consistent or correct unless you have the latest SDK and Unity version. |
Yes I finally could update to latest Unity & I must say it's much better now but what a rocky road to get there from Google! |
@jox Can you confirm that the device has the latest version of Google VR Services? |
@fredsa |
@fredsa By the way, when I go to Settings -> Apps and deactivate the Google VR Services, it will run fine in both non-WQHD+ resolutions. When trying to configure the viewer then, it will ask to install the Cardboard App. |
@jox I've been unable to reproduce this using Unity 2017.3.1p1 on a Samsung Galaxy S8. It would be helpful to know:
|
Hi, everyone
I had issue with switching between 2D and VR Mode
This method cause crash
StartCoroutine(LoadDevice("cardboard"));
`
LOGCAT
libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xc687d808) failed (0xffffffed) (already connected to another API?)
libEGL : eglCreateWindowSurface:484 error 3003 (EGL_BAD_ALLOC)
Unity : [EGL] Failed to create window surface: EGL_BAD_ALLOC: EGL failed to allocate resources for the requested operation.
Unity :
Unity : (Filename: ./Runtime/GfxDevice/egl/WindowContextEGL.cpp Line: 141)
Unity :
libEGL : call to OpenGL ES API with no current context (logged once per thread)
Im using Unity 5.6.0f3 and Samsung S8
I see many similar problem with this method but anyone find solution?
The text was updated successfully, but these errors were encountered: