New issue
Advanced search Search tips

Issue 633224 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug-Regression



Sign in to add a comment

IllegalArgumentException from PopupTouchHandleDrawable.destory() when closing an activity with a webview

Reported by dba...@live.com, Aug 1 2016

Issue description

Steps to reproduce the problem:
1. Open an activity with a webView
2. Start a new activity while clearing the activity stack

Seems to repro quite easily when creating an Andrpod app that authenticates with https://github.com/AzureAD/azure-activedirectory-library-for-android

What is the expected behavior?
Not to crash

What went wrong?
Crash.

Stack trace:

08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err: java.lang.IllegalArgumentException: View=org.chromium.content.browser.input.PopupTouchHandleDrawable{12a55c22 I.ED.... ......ID 0,0-60,72} not attached to window manager
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:398)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:324)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:116)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.widget.PopupWindow.dismiss(PopupWindow.java:1405)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.content.browser.input.PopupTouchHandleDrawable.hide(PopupTouchHandleDrawable.java:467)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.content.browser.input.PopupTouchHandleDrawable.destroy(PopupTouchHandleDrawable.java:437)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.android_webview.AwContents.nativeDestroy(Native Method)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.android_webview.AwContents.access$000(AwContents.java:98)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.android_webview.AwContents$AwContentsDestroyRunnable.run(AwContents.java:371)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.content.common.CleanupReference.runCleanupTaskInternal(CleanupReference.java:164)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.content.common.CleanupReference.access$300(CleanupReference.java:33)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at org.chromium.content.common.CleanupReference$LazyHolder$1.handleMessage(CleanupReference.java:109)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.os.Looper.loop(Looper.java:155)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5725)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at java.lang.reflect.Method.invoke(Method.java:372)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030)
08-01 17:29:55.074 22165-22165/com.example.dbahat.chromiumcrash W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)

Did this work before? Yes Doesn't seem to repro on system.webview version 51.0.2704.81

Chrome version: 52.0.2743.91  Channel: stable
OS Version: 5.1
Flash Version: Shockwave Flash 22.0 r0
 
Components: Mobile>WebView
Labels: -Pri-2 Pri-1

Comment 3 by boliu@chromium.org, Aug 1 2016

Owner: boliu@chromium.org

Comment 4 by boliu@chromium.org, Aug 1 2016

Easier to read stack:
java.lang.IllegalArgumentException: View=org.chromium.content.browser.input.PopupTouchHandleDrawable{12a55c22 I.ED.... ......ID 0,0-60,72} not attached to window manager
    at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:398)
    at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:324)
    at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:116)
    at android.widget.PopupWindow.dismiss(PopupWindow.java:1405)
    at org.chromium.content.browser.input.PopupTouchHandleDrawable.hide(PopupTouchHandleDrawable.java:467)
    at org.chromium.content.browser.input.PopupTouchHandleDrawable.destroy(PopupTouchHandleDrawable.java:437)
    at org.chromium.android_webview.AwContents.nativeDestroy(Native Method)
    at org.chromium.android_webview.AwContents.access$000(AwContents.java:98)
    at org.chromium.android_webview.AwContents$AwContentsDestroyRunnable.run(AwContents.java:371)
    at org.chromium.content.common.CleanupReference.runCleanupTaskInternal(CleanupReference.java:164)
    at org.chromium.content.common.CleanupReference.access$300(CleanupReference.java:33)
    at org.chromium.content.common.CleanupReference$LazyHolder$1.handleMessage(CleanupReference.java:109)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:155)
    at android.app.ActivityThread.main(ActivityThread.java:5725)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1030)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)

Comment 5 by boliu@chromium.org, Aug 1 2016

Cc: amin...@google.com
rb-stable for m52?

Comment 6 by boliu@chromium.org, Aug 1 2016

interestingly, this *may* be fixed already on trunk, by https://codereview.chromium.org/2188593002/
Steps to repro this issue.

Device: Dell/Venue 10/7040 and Acer
Webview: 52.0.2743.91

1. Launch Gmail or OEM email
2. Open an email with has just text in the body > Select  All.
3. Rotate the device portrait mode to landscape or vice versa
4. Go to Home screen > Now select any apps which uses webview

Results:-
Gmail or OEM email is getting crashed


WebviewCrash_Bugreport.txt
14.7 MB View Download
WebviewCrash_logcat.txt
667 KB View Download

Comment 9 by boliu@chromium.org, Aug 1 2016

I have a nexus 5 on M with me atm and can't seem to reproduce on that. dneelamegam: any luck reproducing on a nexus 5?
I don't see any bugs in our code. dneelamegam: those devices you tested, what android version where they running?

I'm guessing this is actually an android side bug, and best I can come up with is just catch the exception. Sucks but android :/
Status: Assigned (was: Unconfirmed)
Yup, RB-Stable for M52 for now, let me know what you come up with.
Labels: ReleaseBlock-Stable M-52
Dell Venue/LMY47I and Acer Predator/LMY47I

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 1 2016

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

commit 6b694e053f5e2a39adae517e668c8402045529b6
Author: boliu <boliu@chromium.org>
Date: Mon Aug 01 22:36:09 2016

android: Swallow PopupWindow exception from android

This is a workaround for Android L bug with PopupWindow.

BUG= 633224 

Review-Url: https://codereview.chromium.org/2201923002
Cr-Commit-Position: refs/heads/master@{#409077}

[modify] https://crrev.com/6b694e053f5e2a39adae517e668c8402045529b6/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java

Labels: Merge-Request-52 Merge-Request-53
safe merge, just swallowing an exception

Comment 17 by dimu@chromium.org, Aug 1 2016

Labels: -Merge-Request-52 Merge-Review-52 Hotlist-Merge-Review
[Automated comment] Request affecting a post-stable build (M52), manual review required.

Comment 18 by dimu@chromium.org, Aug 1 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)

Comment 19 by dimu@chromium.org, Aug 1 2016

Labels: -Merge-Request-52 Merge-Review-52 Hotlist-Merge-Review
[Automated comment] Request affecting a post-stable build (M52), manual review required.
Labels: -Merge-Review-52 Merge-Approved-52
Merge approved for M52 branch 2743 / M52 minibranch 2743_91; please land in both places.
Not reproducible on Samsung Nexus 10 (LMY 47 Y),Samsung s5(mmb29K)  and samsung S5(LRX21V) .
Bisect info:- 
Looks like regression on M52

51.0.2704.81 - Good
52.0.2743.0 - Broken (M52 branch cut)
52.0.2743.81 - Broken
-So far this issue repro only X86 and X86_64 bit devices.

Project Member

Comment 24 by bugdroid1@chromium.org, Aug 1 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04cecd4adba75e90968c5d9fc3a6b53bcc4ec8e0

commit 04cecd4adba75e90968c5d9fc3a6b53bcc4ec8e0
Author: Bo Liu <boliu@chromium.org>
Date: Mon Aug 01 22:47:28 2016

android: Swallow PopupWindow exception from android

This is a workaround for Android L bug with PopupWindow.

BUG= 633224 

Review-Url: https://codereview.chromium.org/2201923002
Cr-Commit-Position: refs/heads/master@{#409077}
(cherry picked from commit 6b694e053f5e2a39adae517e668c8402045529b6)

Review URL: https://codereview.chromium.org/2204693002 .

Cr-Commit-Position: refs/branch-heads/2785@{#454}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/04cecd4adba75e90968c5d9fc3a6b53bcc4ec8e0/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java

Project Member

Comment 25 by bugdroid1@chromium.org, Aug 1 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/715e3d8bd2ef88f2a04b1fba29bb34791eb89f29

commit 715e3d8bd2ef88f2a04b1fba29bb34791eb89f29
Author: Bo Liu <boliu@chromium.org>
Date: Mon Aug 01 23:05:42 2016

[Merge m52] android: Swallow PopupWindow exception from android

This is a workaround for Android L bug with PopupWindow.

BUG= 633224 

Review-Url: https://codereview.chromium.org/2201923002
Cr-Commit-Position: refs/heads/master@{#409077}
(cherry picked from commit 6b694e053f5e2a39adae517e668c8402045529b6)

Review URL: https://codereview.chromium.org/2202043002 .

Cr-Commit-Position: refs/branch-heads/2743@{#722}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/715e3d8bd2ef88f2a04b1fba29bb34791eb89f29/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java

Project Member

Comment 26 by bugdroid1@chromium.org, Aug 1 2016

Labels: merge-merged-2743_91
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c2fef62495e7e8d85f5f59b4e140a746f22bf36

commit 6c2fef62495e7e8d85f5f59b4e140a746f22bf36
Author: Bo Liu <boliu@chromium.org>
Date: Mon Aug 01 23:13:38 2016

android: Swallow PopupWindow exception from android

This is a workaround for Android L bug with PopupWindow.

BUG= 633224 

Review-Url: https://codereview.chromium.org/2201923002
Cr-Commit-Position: refs/heads/master@{#409077}
(cherry picked from commit 6b694e053f5e2a39adae517e668c8402045529b6)

Review URL: https://codereview.chromium.org/2204733002 .

Cr-Commit-Position: refs/branch-heads/2743_91@{#12}
Cr-Branched-From: 0a96508ae56b27a40bca65322c9feb81e0f3fb49-refs/branch-heads/2743@{#700}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/6c2fef62495e7e8d85f5f59b4e140a746f22bf36/content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java

Status: Fixed (was: Assigned)
Verified on latest M53 webview on Asus ZenPad C70.
Verified on latest M52 webview on /Acer Predator/LMY47I

Sign in to add a comment