New issue
Advanced search Search tips

Issue 690625 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner: ----
Closed: Mar 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug
Proj-XR
Proj-XR-VR



Sign in to add a comment

Initializing VrShellImpl can throw a NullPointerException

Project Member Reported by bsheedy@chromium.org, Feb 9 2017

Issue description

So far I've only seen this in the Java tests. Happens consistently with the NFC test, and on-and-off with the enter/exit test.

Stack trace:

02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl: Unable to instantiate VrShellImpl
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl: java.lang.NullPointerException: Attempt to invoke interface method 'void org.chromium.chrome.browser.tabmodel.TabModelSelector.removeObserver(org.chromium.chrome.browser.tabmodel.TabModelSelectorObserver)' on a null object reference
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.compositor.CompositorViewHolder.detachForVR(CompositorViewHolder.java:978)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.vr_shell.VrShellImpl.<init>(VrShellImpl.java:113)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.vr_shell.VrClassesWrapperImpl.createVrShell(VrClassesWrapperImpl.java:56)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.vr_shell.VrShellDelegate.enterVR(VrShellDelegate.java:1540)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.vr_shell.VrShellDelegate.access$300(VrShellDelegate.java:48)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at org.chromium.chrome.browser.vr_shell.VrShellDelegate$2.run(VrShellDelegate.java:246)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at android.os.Handler.handleCallback(Handler.java:751)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at android.os.Handler.dispatchMessage(Handler.java:95)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at android.os.Looper.loop(Looper.java:154)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at android.app.ActivityThread.main(ActivityThread.java:6121)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at java.lang.reflect.Method.invoke(Native Method)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
02-09 11:17:29.893  4275  4275 E cr_VrClassesWrapperImpl:       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
 
bsheedy@ :
After investigation, this situation happens when mobile is in a portrait mode and daydream setting "skip enter VR".
I think the root cause is when enter VR the view will destroy and re-create for transform from portrait to land-scale. If create VrShell before view ready, it will got info from an in-active activity and a CompositorViewHolder which have mTabModelSelector with value null.
I'll work on this if no others are working on this.
Status: Assigned (was: Untriaged)
Thanks Shaobo, go ahead.
I think this is fixed by the patch https://codereview.chromium.org/2727873002/
Status: Fixed (was: Assigned)
Labels: VR-Caught-By-Test
Labels: Test-Complete
Labels: -VR-Caught-By-Test XR-Caught-By-Test

Sign in to add a comment