Skip to content
This repository has been archived by the owner on Nov 8, 2019. It is now read-only.

daydream app ANR when click “return to vr” in android 8.1 #819

Closed
fructusmori opened this issue Dec 22, 2017 · 3 comments
Closed

daydream app ANR when click “return to vr” in android 8.1 #819

fructusmori opened this issue Dec 22, 2017 · 3 comments
Labels

Comments

@fructusmori
Copy link

fructusmori commented Dec 22, 2017

Found using:

  • Google VR SDK version: 1.70.0
  • Unity version: 5.6.2
  • Phone manufacturer, model, and O/S version: pixel2 android 8.1
  • Viewer manufacturer & model: ___

Steps to reproduce the issue:

  1. get permission in daydream vr app
  2. allow permission in system dialog
  3. click “return to vr”
  4. ANR

Workarounds:

Additional comments:
at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native method)
at com.unity3d.player.ReflectionHelper.a (unavailable)
at com.unity3d.player.ReflectionHelper$1.invoke (unavailable)
at java.lang.reflect.Proxy.invoke (Proxy.java:913)
at com.google.gvr.permissionsupport.PermissionsFragment$PermissionsCallback.onRequestPermissionResult (PermissionsFragment.java)
at com.google.gvr.permissionsupport.PermissionsFragment.setPermissionResult (PermissionsFragment.java:155)
at com.google.gvr.permissionsupport.TransitionVRActivity.returnToVR (TransitionVRActivity.java:122)
at java.lang.reflect.Method.invoke (Native method)
at android.view.View$DeclaredOnClickListener.onClick (View.java:5331)
at android.view.View.performClick (View.java:6256)
at android.view.View$PerformClick.run (View.java:24697)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6541)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)

@fredsa
Copy link
Member

fredsa commented Jan 5, 2018

Thank you for reporting this.

Using Unity 2017.3.0p1 with the PermissionsDemo scene from Google VR SDK for Unity 1.110.0 I see the following (somewhat different) behavior on a Pixel:

When clicking "request permissions", the user is prompted to remove the phone from the viewer.
If you then rotate the phone to portrait orientation:

  • The permissions dialog appears briefly
  • The permissions dialog then disappears with an Activity com.google.gvr.permissionsupport.TransitionVRActivity has leaked ServiceConnection message in the device logs
  • The permissions dialog is shown a second time
  • The user can then "Allow" or "Deny" the permission normally

Here's the full stack trace shown:

ActivityThread: Activity com.google.gvr.permissionsupport.TransitionVRActivity has leaked ServiceConnection com.google.vr.ndk.base.DaydreamApi$1@42b5109 that was originally bound here
ActivityThread: android.app.ServiceConnectionLeaked: Activity com.google.gvr.permissionsupport.TransitionVRActivity has leaked ServiceConnection com.google.vr.ndk.base.DaydreamApi$1@42b5109 that was originally bound here
ActivityThread:         at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1532)
ActivityThread:         at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1424)
ActivityThread:         at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1605)
ActivityThread:         at android.app.ContextImpl.bindService(ContextImpl.java:1557)
ActivityThread:         at android.content.ContextWrapper.bindService(ContextWrapper.java:684)
ActivityThread:         at com.google.vr.ndk.base.DaydreamApi.init(DaydreamApi.java:928)
ActivityThread:         at com.google.vr.ndk.base.DaydreamApi.create(DaydreamApi.java:144)
ActivityThread:         at com.google.gvr.permissionsupport.TransitionVRActivity.onCreate(TransitionVRActivity.java:71)
ActivityThread:         at android.app.Activity.performCreate(Activity.java:6999)
ActivityThread:         at android.app.Activity.performCreate(Activity.java:6990)
ActivityThread:         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
ActivityThread:         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
ActivityThread:         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
ActivityThread:         at android.app.ActivityThread.-wrap11(Unknown Source:0)
ActivityThread:         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
ActivityThread:         at android.os.Handler.dispatchMessage(Handler.java:106)
ActivityThread:         at android.os.Looper.loop(Looper.java:164)
ActivityThread:         at android.app.ActivityThread.main(ActivityThread.java:6494)
ActivityThread:         at java.lang.reflect.Method.invoke(Native Method)
ActivityThread:         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
ActivityThread:         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

@fructusmori
Copy link
Author

fructusmori commented Jan 8, 2018

Thank you for your reply.
I tried a few times again, and the same situation you've met was found.
But my earliest report of ANR appears after clicking “return to vr”, and the probability of reiteration is not high.
Are these two cases the same problem?
And do you have any suggestions to solve the problem?
Thank you.

@rusmaxham rusmaxham added the bug label Mar 28, 2018
@rusmaxham
Copy link
Contributor

Fixed in v1.130.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants