Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mozc for Android keeps crashing #345

Closed
yukawa opened this issue Jan 4, 2016 · 0 comments · Fixed by #346
Closed

Mozc for Android keeps crashing #345

yukawa opened this issue Jan 4, 2016 · 0 comments · Fixed by #346
Assignees

Comments

@yukawa
Copy link
Collaborator

yukawa commented Jan 4, 2016

Environment

Confirmed with Mozc 2.17.2287.102 running on Android 6.0.1 MNB29K / Nexus 5 2013.

Possible affected versions are from Mozc 2.17.2264.102 to Mozc 2.17.2287.102.
Probably there is no device/OS version dependency.

Steps to reproduce:

  1. Build Mozc 2.17.2287.102 for Android.
  2. Install Mozc into Android 6.0.1 MMB29K on Nexus 5 2013.
  3. Enable Mozc.
  4. Switch to Mozc.

Expected behavior

Mozc starts working.

Actual behavior

Mozc starts crashing.

Here is the relevant crash log.

01-01 07:01:38.536  3870  3870 I Mozc    : We use local Mozc engine.
01-01 07:01:38.555  3870  3901 E Mozc    : loadLibrary failed
01-01 07:01:38.555  3870  3901 E Mozc    : java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN4mozc3jni19JavaHttpClientProxy9SetJavaVMEP7_JavaVM" referenced by "/data/app/org.mozc.android.inputmethod.japanese-1/lib/arm/libmozc.so"...
01-01 07:01:38.555  3870  3901 E Mozc    :  at java.lang.Runtime.loadLibrary(Runtime.java:372)
01-01 07:01:38.555  3870  3901 E Mozc    :  at java.lang.System.loadLibrary(System.java:1076)
01-01 07:01:38.555  3870  3901 E Mozc    :  at org.mozc.android.inputmethod.japanese.session.MozcJNI.load(MozcJNI.java:71)
01-01 07:01:38.555  3870  3901 E Mozc    :  at org.mozc.android.inputmethod.japanese.session.LocalSessionHandler.initialize(LocalSessionHandler.java:97)
01-01 07:01:38.555  3870  3901 E Mozc    :  at org.mozc.android.inputmethod.japanese.session.SessionExecutor$ExecutorMainCallback.handleMessage(SessionExecutor.java:321)
01-01 07:01:38.555  3870  3901 E Mozc    :  at android.os.Handler.dispatchMessage(Handler.java:98)
01-01 07:01:38.555  3870  3901 E Mozc    :  at android.os.Looper.loop(Looper.java:148)
01-01 07:01:38.555  3870  3901 E Mozc    :  at android.os.HandlerThread.run(HandlerThread.java:61)
--------- beginning of crash
01-01 07:01:38.555  3870  3901 E AndroidRuntime: FATAL EXCEPTION: Session worker thread
01-01 07:01:38.555  3870  3901 E AndroidRuntime: Process: org.mozc.android.inputmethod.japanese, PID: 3870
01-01 07:01:38.555  3870  3901 E AndroidRuntime: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN4mozc3jni19JavaHttpClientProxy9SetJavaVMEP7_JavaVM" referenced by "/data/app/org.mozc.android.inputmethod.japanese-1/lib/arm/libmozc.so"...
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.session.MozcJNI.load(MozcJNI.java:75)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.session.LocalSessionHandler.initialize(LocalSessionHandler.java:97)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.session.SessionExecutor$ExecutorMainCallback.handleMessage(SessionExecutor.java:321)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:98)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at android.os.HandlerThread.run(HandlerThread.java:61)
01-01 07:01:38.555  3870  3901 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN4mozc3jni19JavaHttpClientProxy9SetJavaVMEP7_JavaVM" referenced by "/data/app/org.mozc.android.inputmethod.japanese-1/lib/arm/libmozc.so"...
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at java.lang.Runtime.loadLibrary(Runtime.java:372)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at java.lang.System.loadLibrary(System.java:1076)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.session.MozcJNI.load(MozcJNI.java:71)
01-01 07:01:38.555  3870  3901 E AndroidRuntime:    ... 5 more

Additional Information:

This is a regression accidentally introduced by 9cd4d36. The root cause is that base/base.gyp:jni_proxy GYP target is not linked to libmozc.so unless branding=="GoogleJapaneseInput"

@yukawa yukawa self-assigned this Jan 4, 2016
@yukawa yukawa added the bug label Jan 4, 2016
yukawa added a commit that referenced this issue Jan 4, 2016
This is a follow up CL for 9cd4d36.

The root cause of the runtime crash is that base/base.gyp:jni_proxy is
not linked to libmozc.so only in OSS build because the link dependency
on 'jni_proxy' target is specified in 'net/net.gyp' only when
branding=="GoogleJapaneseInput".  There are two different problems.

 1. There are direct function invocations of base/android_jni_proxy.cc
    from android/jni/mozcjni.cc.  Hence it's 'android/android.gyp:mozc'
    that should have declared the dependency on 'base/base.gyp:jni_proxy'.
    Declaring the dependency in 'net/net.gyp' does not make much sense.
 2. With CL 96942303, 'base/base.gyp:jni_proxy' needs to be linked to
    libmozc.so even in OSS build.

This CL addresses both of avobe issues.

Closes #345.

BUG=#345
TEST=compile
REF_BUG=26369443
REF_CL=111290167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant