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

Issue 738067 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug
Proj-VR
Proj-XR

Blocking:
issue 683256



Sign in to add a comment

vr_shell's VrCore java contains native method without native-side implemention

Project Member Reported by agrieve@chromium.org, Jun 29 2017

Issue description

 Bug 683256  changes JNI registration such that all native methods defined in .java files are automatically registered from JNI_OnLoad().

This causes a linker error for non-arm/arm64 targets because vr_shell is including .java files that have native methods, but is not including the .cc files on the native side.

Specifically:
- VrShellDelegate and VrCoreInfo are always included in the dex
- vr_shell_delegate.cc and vr_core_info.cc are included only when enable_vr=true

We should either always include the .cc files, or exclude the .java files.

To repro, just patch in https://chromium-review.googlesource.com/c/553157/ and build with target_cpu="x86"
 
Cc: mthiesse@chromium.org cjgrant@chromium.org
Components: UI>Browser>VR
Blocking: 683256
Labels: M-61
Cc: -mthiesse@chromium.org bshe@chromium.org
Owner: mthiesse@chromium.org
bshe is out today, I can fix this.
I should note that this is way more complicated than always excluding or including more files, and will probably require some significant refactoring.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 30 2017

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

commit 00dcdcaefbacf82529f73820318f6ae65c17e253
Author: Yipeng Wang <yipengw@chromium.org>
Date: Fri Jun 30 14:10:39 2017

Reland #2: [Android JNI] Generate calls to RegisterNatives()

Reverted in: Ibb4a5203f3811cf26fa13d8684a849278b4c316f

Reason for reland: Excluded VR native side from JNI registration
when not on arm/arm64.

Bug:  683256 ,  738067 
Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
Reviewed-on: https://chromium-review.googlesource.com/557099
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483692}
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/android_webview/test/embedded_test_server/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/SampleForTests_jni.golden
[add] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/jni_exception_list.gni
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/jni_generator.py
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/jni_generator_helper.h
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/jni_generator_tests.py
[add] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/jni_registration_generator.py
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testInnerClassNatives.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testInnerClassNativesMultiple.golden
[delete] https://crrev.com/a3530331759f8edfb4ee8e595fa9f11bb5cb5670/base/android/jni_generator/testMainDexFile.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testMultipleJNIAdditionalImport.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testNatives.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testNativesLong.golden
[delete] https://crrev.com/a3530331759f8edfb4ee8e595fa9f11bb5cb5670/base/android/jni_generator/testNonMainDexFile.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/base/android/jni_generator/testSingleJNIAdditionalImport.golden
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/build/android/gradle/generate_gradle.py
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/build/android/gyp/write_build_config.py
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/build/config/android/rules.gni
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/android/java_sources.gni
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/browser/android/DEPS
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/browser/android/chrome_entry_point.cc
[add] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/browser/android/chrome_sync_shell_entry_point.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/browser/media/android/remote/remote_media_player_bridge.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chrome/browser/media/android/router/media_router_android_bridge.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chromecast/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chromecast/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/chromecast/app/android/cast_jni_loader.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/components/cronet/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/components/cronet/android/cronet_library_loader.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/content/shell/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/content/shell/android/linker_test_apk/chromium_linker_test_android.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/content/shell/android/shell_library_loader.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/mojo/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/net/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/remoting/android/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/remoting/client/jni/BUILD.gn
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/remoting/client/jni/remoting_jni_onload.cc
[modify] https://crrev.com/00dcdcaefbacf82529f73820318f6ae65c17e253/testing/test.gni

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 30 2017

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

commit 1a3119620c4582a27c8d2dade010206ee4fd388a
Author: Yipeng Wang <yipengw@chromium.org>
Date: Fri Jun 30 15:27:54 2017

Revert "Reland #2: [Android JNI] Generate calls to RegisterNatives()"

This reverts commit 00dcdcaefbacf82529f73820318f6ae65c17e253.

Reason for revert: break downstream x64 compile.

Original change's description:
> Reland #2: [Android JNI] Generate calls to RegisterNatives()
> 
> Reverted in: Ibb4a5203f3811cf26fa13d8684a849278b4c316f
> 
> Reason for reland: Excluded VR native side from JNI registration
> when not on arm/arm64.
> 
> Bug:  683256 ,  738067 
> Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
> 
> TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org
> 
> Change-Id: I1c6ed0b91d6628819f6f1a9750c7a98ed74bace8
> Reviewed-on: https://chromium-review.googlesource.com/557099
> Commit-Queue: Yipeng Wang <yipengw@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#483692}

TBR=agrieve@chromium.org,estevenson@chromium.org,yipengw@chromium.org

Change-Id: I31b4c809584f8dbb8e5626a28562d94a422611e7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  683256 ,  738067 
Reviewed-on: https://chromium-review.googlesource.com/558101
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483709}
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/android_webview/test/embedded_test_server/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/SampleForTests_jni.golden
[delete] https://crrev.com/1df1eeea57cc15ef9513972c2d90cb3731b34854/base/android/jni_generator/jni_exception_list.gni
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/jni_generator.py
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/jni_generator_helper.h
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/jni_generator_tests.py
[delete] https://crrev.com/1df1eeea57cc15ef9513972c2d90cb3731b34854/base/android/jni_generator/jni_registration_generator.py
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testInnerClassNatives.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testInnerClassNativesMultiple.golden
[add] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testMainDexFile.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testMultipleJNIAdditionalImport.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testNatives.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testNativesLong.golden
[add] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testNonMainDexFile.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/base/android/jni_generator/testSingleJNIAdditionalImport.golden
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/build/android/gradle/generate_gradle.py
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/build/android/gyp/write_build_config.py
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/build/config/android/rules.gni
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/android/java_sources.gni
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/browser/android/DEPS
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/browser/android/chrome_entry_point.cc
[delete] https://crrev.com/1df1eeea57cc15ef9513972c2d90cb3731b34854/chrome/browser/android/chrome_sync_shell_entry_point.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/browser/media/android/remote/remote_media_player_bridge.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chrome/browser/media/android/router/media_router_android_bridge.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chromecast/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chromecast/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/chromecast/app/android/cast_jni_loader.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/components/cronet/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/components/cronet/android/cronet_library_loader.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/content/shell/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/content/shell/android/linker_test_apk/chromium_linker_test_android.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/content/shell/android/shell_library_loader.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/mojo/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/net/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/remoting/android/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/remoting/client/jni/BUILD.gn
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/remoting/client/jni/remoting_jni_onload.cc
[modify] https://crrev.com/1a3119620c4582a27c8d2dade010206ee4fd388a/testing/test.gni

Status: Fixed (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Jun 30 2017

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

commit 158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac
Author: Yipeng Wang <yipengw@chromium.org>
Date: Fri Jun 30 18:16:41 2017

Reland #3: [Android JNI] Generate calls to RegisterNatives()

Reverted in: I31b4c809584f8dbb8e5626a28562d94a422611e7

Reason for reland: CL 556581 has fixed the bug.

TBR=sky@chromium.org,yfriedman@chromium.org,phajdan.jr@chromium.org,mef@chromium.org,torne@chromium.org,sergeyu@chromium.org,agrieve@chromium.org,halliwell@chromium.org,joedow@chromium.org,estevenson@chromium.org,jbudorick@chromium.org,yipengw@chromium.org

Bug:  683256 ,  738067 
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: Ie1afd9b6e606ebecfdf5ffbd0897fabbdfd3e157
Reviewed-on: https://chromium-review.googlesource.com/558004
Commit-Queue: Yipeng Wang <yipengw@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483760}
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/android_webview/test/embedded_test_server/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/SampleForTests_jni.golden
[add] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/jni_exception_list.gni
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/jni_generator.py
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/jni_generator_helper.h
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/jni_generator_tests.py
[add] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/jni_registration_generator.py
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testInnerClassNatives.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testInnerClassNativesBothInnerAndOuter.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testInnerClassNativesMultiple.golden
[delete] https://crrev.com/79eb7ebaabeb87fd76da56f35de0ab5776806a15/base/android/jni_generator/testMainDexFile.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testMultipleJNIAdditionalImport.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testNatives.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testNativesLong.golden
[delete] https://crrev.com/79eb7ebaabeb87fd76da56f35de0ab5776806a15/base/android/jni_generator/testNonMainDexFile.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/base/android/jni_generator/testSingleJNIAdditionalImport.golden
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/build/android/gradle/generate_gradle.py
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/build/android/gyp/write_build_config.py
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/build/config/android/rules.gni
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/android/java_sources.gni
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/browser/android/DEPS
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/browser/android/chrome_entry_point.cc
[add] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/browser/android/chrome_sync_shell_entry_point.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/browser/media/android/remote/remote_media_player_bridge.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chrome/browser/media/android/router/media_router_android_bridge.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chromecast/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chromecast/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/chromecast/app/android/cast_jni_loader.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/components/cronet/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/components/cronet/android/cronet_library_loader.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/content/shell/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/content/shell/android/linker_test_apk/chromium_linker_test_android.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/content/shell/android/shell_library_loader.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/mojo/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/net/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/remoting/android/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/remoting/client/jni/BUILD.gn
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/remoting/client/jni/remoting_jni_onload.cc
[modify] https://crrev.com/158dbc5cc2f86f152f4e587bd27f57f9b8d5d3ac/testing/test.gni

Components: -UI>Browser>VR Internals>VR
Labels: Proj-VR OS-Android
Labels: -Proj-VR Proj-VR-Daydream
Components: Internals>XR

Sign in to add a comment