New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 680216 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR



Sign in to add a comment

WebVR exitPresent causes browser crash due to null VR Shell pointer

Project Member Reported by bsheedy@chromium.org, Jan 11 2017

Issue description

Reproducible 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.
 
exitPresentCrash.txt
326 KB View Download
Labels: Stability-Crash ReleaseBlock-Beta
Status: Available (was: Untriaged)

Comment 2 by bshe@chromium.org, Jan 12 2017

Owner: bshe@chromium.org
Status: Started (was: Available)
I will take a look
Status: Fixed (was: Started)
No longer able to reproduce on ToT with the fix applied, so closing.
Components: Blink>WebXR

Sign in to add a comment