New issue
Advanced search Search tips

Issue 789168 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

NPE in WebView onDragEvent

Project Member Reported by tobiasjs@chromium.org, Nov 28 2017

Issue description

After updating to Android System WebView (version 62.0.3202.84), if admob banner refreshes itself during a drag action on another view, this bug occurs when the view is dropped:

java.lang.NullPointerException: 
  at org.chromium.android_webview.AwContents$AwViewMethodsImpl.onDragEvent (AwContents.java:191)
  at com.android.webview.chromium.WebViewChromium.onDragEvent (WebViewChromium.java:782)
  at android.webkit.WebView.onDragEvent (WebView.java:2554)
  at android.view.View.dispatchDragEvent (View.java:22202)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1431)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewGroup.dispatchDragEvent (ViewGroup.java:1417)
  at android.view.ViewRootImpl.handleDragEvent (ViewRootImpl.java:6308)
  at android.view.ViewRootImpl.-wrap11 (ViewRootImpl.java)
  at android.view.ViewRootImpl$ViewRootHandler.handleMessage (ViewRootImpl.java:4199)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:154)
  at android.app.ActivityThread.main (ActivityThread.java:6776)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)

You can reproduce it in these steps:
- create an activity with an adbanner on bottom, having frequency update = optimized by google
- start a drag on a view (contained in the activity) and keep view dragged until banner refresh
- drop view
- app freezes with that stacktrace

cloned from AOSP bug b/69347400
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 29 2017

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

commit 1e6c40b7d3c2cafccf01f698dea9ddacf686cdb9
Author: Tobias Sargeant <tobiasjs@google.com>
Date: Wed Nov 29 00:12:07 2017

aw: Check if destroyed before using mWebContents in onDragEvent

Bug:  789168 
Change-Id: Ib90d86b1e286c3e5c5e2b8d13adde4bf7edc9b34
Reviewed-on: https://chromium-review.googlesource.com/793818
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519918}
[modify] https://crrev.com/1e6c40b7d3c2cafccf01f698dea9ddacf686cdb9/android_webview/java/src/org/chromium/android_webview/AwContents.java

Status: Fixed (was: Assigned)

Sign in to add a comment