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

Issue 731642 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Not on Chrome anymore
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-VR
Proj-XR



Sign in to add a comment

Crash in VrShellDelegate.isVrCoreCompatible()

Project Member Reported by bauerb@chromium.org, Jun 9 2017

Issue description

Stack trace:
java.lang.RuntimeException: An error occurred while executing doInBackground()
  at android.os.AsyncTask$3.done(AsyncTask.java:325)
  at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
  at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
  at java.util.concurrent.FutureTask.run(FutureTask.java:242)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
  at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
  at android.os.Handler.<init>(Handler.java:200)
  at android.os.Handler.<init>(Handler.java:114)
  at org.chromium.chrome.browser.vr_shell.VrShellDelegate.isVrCoreCompatible(VrShellDelegate.java:1106)
  at org.chromium.chrome.browser.vr_shell.VrShellDelegate.getVrSupportLevel(VrShellDelegate.java:282)
  at org.chromium.chrome.browser.vr_shell.VrShellDelegate$1.doInBackground(VrShellDelegate.java:310)
  at org.chromium.chrome.browser.vr_shell.VrShellDelegate$1.doInBackground(VrShellDelegate.java:302)
  at android.os.AsyncTask$2.call(AsyncTask.java:305)
  at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  ... 3 more

VrShellDelegate.isVrCoreCompatible() is called on a background thread from an AsyncTask, so a) posting a task asynchronously to the same thread isn't allowed, and b) it would be the wrong thread to show UI anyway.
 

Comment 1 by awdf@chromium.org, Jun 9 2017

I get this too on launch - any workaround?

Comment 3 by awdf@chromium.org, Jun 9 2017

Thanks, yes that fixes it! (And super easy to patch in thanks to gerrit :D)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5434be20a6cc4227e1944cca8a600e3fd5c42457

commit 5434be20a6cc4227e1944cca8a600e3fd5c42457
Author: Bernhard Bauer <bauerb@chromium.org>
Date: Fri Jun 09 13:23:03 2017

Prompt to update VR services on the UI thread.

TBR=mthiesse@chromium.org

Bug:  731642 
Change-Id: I8973749fefba82118c2c19beda5f21b6562a2b83
Reviewed-on: https://chromium-review.googlesource.com/528085
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478260}
[modify] https://crrev.com/5434be20a6cc4227e1944cca8a600e3fd5c42457/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Status: Fixed (was: Started)
Components: -UI>Browser>VR Internals>VR
Labels: Proj-VR-Daydream
Components: Internals>XR

Sign in to add a comment