WebVR exitPresent causes browser crash due to null VR Shell pointer |
||||
Issue descriptionReproducible on Android Canary 57.0.2978.0 on Pixel device Reproduction steps: 1. Access https://webvr.info/samples/03-vr-presentation.html on the Android device 2. Connect the device to a workstation and inspect the tab (F12 -> Remote devices) 3. Run the following Javascript in the console: var disp; var can = document.getElementById("webgl-canvas"); navigator.getVRDisplays().then( (displays) => {disp = displays[0];}); disp.requestPresent([{ source: can}]); << Complete DON flow >> disp.exitPresent(); 4. Hold the device in portrait mode to get past Daydream's "remove headset" screen 5. Canary crashes Logcat dump is attached, most relevant-looking part is: 01-11 11:11:36.185 8097 8097 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=721251, result=-1, data=Intent { }} to activity {com.chrome.canary/org.chromium.chrome.browser.ChromeTabbedActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void org.chromium.chrome.browser.vr_shell.VrShell.setVrModeEnabled(boolean)' on a null object reference 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4089) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread.-wrap20(ActivityThread.java) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void org.chromium.chrome.browser.vr_shell.VrShell.setVrModeEnabled(boolean)' on a null object reference 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at org.chromium.chrome.browser.ChromeTabbedActivity.onActivityResultWithNative(ChromeTabbedActivity.java:31416) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at org.chromium.chrome.browser.init.AsyncInitializationActivity.onActivityResult(AsyncInitializationActivity.java:8272) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:6932) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4085) 01-11 11:11:36.185 8097 8097 E AndroidRuntime: ... 9 more This appears to be reproducible with the viewer set to Cardboard, as well.
,
Jan 12 2017
I will take a look
,
Jan 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/66b3577ead1992c749bd9af002413e6e408c5bd3 commit 66b3577ead1992c749bd9af002413e6e408c5bd3 Author: bshe <bshe@chromium.org> Date: Fri Jan 13 20:40:25 2017 Fix crash when set VR mode to false after VrShell is destroyed BUG= 680216 Review-Url: https://codereview.chromium.org/2632493004 Cr-Commit-Position: refs/heads/master@{#443653} [rename] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesWrapper.java [rename] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesWrapperImpl.java [modify] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShell.java [modify] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java [modify] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java [modify] https://crrev.com/66b3577ead1992c749bd9af002413e6e408c5bd3/chrome/android/java_sources.gni
,
Jan 13 2017
No longer able to reproduce on ToT with the fix applied, so closing.
,
Jul 4
|
||||
►
Sign in to add a comment |
||||
Comment 1 by ddorwin@chromium.org
, Jan 11 2017Status: Available (was: Untriaged)