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 keeps crashing on Android N Developer Preview 5 #370

Closed
yukawa opened this issue Jul 23, 2016 · 0 comments
Closed

Mozc keeps crashing on Android N Developer Preview 5 #370

yukawa opened this issue Jul 23, 2016 · 0 comments

Comments

@yukawa
Copy link
Collaborator

yukawa commented Jul 23, 2016

Environment

  • Mozc 2.17.2326.103 (as of 2bb786c) and later
  • Nexus 5X
  • Android 7.0.0 NPD90G (Android N Developer Preview 5)

How to setup the environment to reproduce

  1. Flash Android 7.0.0 NPD90G into Nexus 5X
  2. Complete the setup wizard
  3. Build and install Mozc for Android 2.17.2354.103
  4. adb shell ime enable org.mozc.android.inputmethod.japanese/.MozcService
  5. adb shell ime set org.mozc.android.inputmethod.japanese/.MozcService

Steps to reproduce

  1. Tap any input field.

Expected behavior

Mozc does not crash.

Actual behavior

Mozc keeps crashing with the following error.

--------- beginning of crash
01-01 07:08:29.470  7004  7004 E AndroidRuntime: FATAL EXCEPTION: main
01-01 07:08:29.470  7004  7004 E AndroidRuntime: Process: org.mozc.android.inputmethod.japanese, PID: 7004
01-01 07:08:29.470  7004  7004 E AndroidRuntime: java.lang.IllegalArgumentException: MozcPictureDrawable doesn't accept h/w accelerated canvas, which doesn't support drawPicture().
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.view.MozcPictureDrawable.draw(MozcPictureDrawable.java:52)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.graphics.drawable.DrawableContainer.draw(DrawableContainer.java:86)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardViewBackgroundSurface$SurfaceCanvasImpl.drawDrawableInternal(KeyboardViewBackgroundSurface.java:149)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardViewBackgroundSurface$SurfaceCanvasImpl.drawDrawableAtCenterWithKeepAspectRatio(KeyboardViewBackgroundSurface.java:140)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardViewBackgroundSurface.renderKey(KeyboardViewBackgroundSurface.java:254)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardViewBackgroundSurface.draw(KeyboardViewBackgroundSurface.java:204)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardViewBackgroundSurface.draw(KeyboardViewBackgroundSurface.java:213)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at org.mozc.android.inputmethod.japanese.keyboard.KeyboardView.onDraw(KeyboardView.java:390)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:17067)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16049)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.470  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16044)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:16833)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.drawChild(ViewGroup.java:3764)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3550)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.View.draw(View.java:17070)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at com.android.internal.policy.DecorView.draw(DecorView.java:751)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.View.updateDisplayListIfDirty(View.java:16049)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:656)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:662)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:770)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewRootImpl.draw(ViewRootImpl.java:2796)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2604)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2211)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.Choreographer.doCallbacks(Choreographer.java:683)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.Choreographer.doFrame(Choreographer.java:619)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:751)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6077)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
01-01 07:08:29.471  7004  7004 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Additional Information

This issue was introduced in 2.17.2326.103 by 2bb786c.

In Android N, DrawableContainer always invokes its children's mutate() method. If BufferedDrawable#mutate() returned its base Drawable, it'd be possible that that raw MozcPictureDrawable renders on h/w canvas directly.


Internal Issue ID: 25780510.

@yukawa yukawa closed this as completed Jul 24, 2016
yukawa pushed a commit that referenced this issue Jul 24, 2016
BUG=
TEST=manually done with NPD90G on Nexus 5X
REF_BUG=25780510
REF_CL=108320067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant