New issue
Advanced search Search tips

Issue 873826 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 15
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression
Proj-VR
Proj-XR
Proj-XR-VR



Sign in to add a comment

Chrome crashing on standalone VR devices due to JNI error

Project Member Reported by bsheedy@chromium.org, Aug 13

Issue description

Building Chromium (chrome_public_apk) on ToT and trying to run it on a standalone VR device (Mirage Solo) results in the first run experience working as expected, but afterwards, just a black screen with no way to get back to the dashboard.

Canary 70.0.3521.0 works as expected, but ToT @ bad50d9b734e9deb783db8682fb86d1ed32f615f does not.

This is caused by a JNI error:
08-13 14:54:03.933  4031  4031 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for long org.chromium.chrome.browser.vr.VrShellDelegate.nativeInit() (tried Java_org_chromium_chrome_browser_vr_VrShellDelegate_nativeInit and Java_org_chromium_chrome_browser_vr_VrShellDelegate_nativeInit__)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.vr.VrShellDelegate.nativeInit(Native Method)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.vr.VrShellDelegate.<init>(VrShellDelegate.java:1027)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.vr.VrShellDelegate.getInstance(VrShellDelegate.java:1018)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.vr.VrShellDelegate.onNewIntentWithNative(VrShellDelegate.java:595)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.vr.VrDelegateImpl.onNewIntentWithNative(VrDelegateImpl.java:118)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeActivity.finishNativeInitialization(ChromeActivity.java:1376)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.ChromeTabbedActivity.finishNativeInitialization(ChromeTabbedActivity.java:602)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.init.ChromeBrowserInitializer$9.run(ChromeBrowserInitializer.java:332)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at org.chromium.chrome.browser.init.ChainedTasks$1.run(ChainedTasks.java:28)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:789)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:98)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6633)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
08-13 14:54:03.933  4031  4031 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:772)
 
The revision Canary was built from is f556ecc66642a766cfb8c85e717a0f5d5a7c5ad3. Will do a bisect.
Correction: The above revision is on the Canary branch. It points to d4f53994652091b0aec3d97f3f5d1f7d00bc6a77 in src.
Repros even on the revision Canary was built on (d6179b49f9ac994d10e56e18e35c551879ecc4be).
monochrome_public_apk works properly at both revisions, so it looks like this is an issue of chrome_public_apk specifically not working (although AFAIK it should).

GN args used are:

ffmpeg_branding = "Chrome"
is_component_build = false
is_debug = true
proprietary_codecs = true
strip_absolute_paths_from_debug_symbols = true
symbol_level = 1
target_cpu = "arm64"
target_os = "android"
use_goma = true
Labels: Target-70 FoundIn-70
Owner: tiborg@chromium.org
Status: Assigned (was: Available)
This probably is a JNI issue. Monochrome doesn't use the crazy linker. Thus, JNI registration is not required, IIUC. Looking into this.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 15

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

commit 2e0fcf3df06e5286f9b706f495b367eeff888d65
Author: Tibor Goldschwendt <tiborg@chromium.org>
Date: Wed Aug 15 16:28:12 2018

[vr] Register native JNI functions before calling them

Bug:  873826 
Change-Id: I9381fb88efd83933e30d5c14050f50500f241469
Reviewed-on: https://chromium-review.googlesource.com/1175084
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583275}
[modify] https://crrev.com/2e0fcf3df06e5286f9b706f495b367eeff888d65/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java

Status: Fixed (was: Assigned)

Sign in to add a comment