Issue 448389 in chromium: WebView crashes on opening of popup

474 views
Skip to first unread message

chro...@googlecode.com

unread,
Jan 13, 2015, 10:48:14 AM1/13/15
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Stability-Crash Pri-2 Via-Wizard Type-Bug OS-Android

New issue 448389 by car...@instantbits.com: WebView crashes on opening of
popup
https://code.google.com/p/chromium/issues/detail?id=448389

Steps to reproduce the problem:
I have a browser app which uses the Android WebView and I am getting crash
reports on the Play Developer Console for 5.0 devices only. The users claim
the crash happens sometimes when they open a popup. I have not been able to
reproduce the issue but I have a lot of users reporting this issue.

The exception that comes through on the crash report on the Play Developer
Console is this:

java.util.concurrent.TimeoutException:
android.view.ThreadedRenderer.finalize() timed out after 10 seconds
at android.view.ThreadedRenderer.nDeleteProxy(Native Method)
at android.view.ThreadedRenderer.finalize(ThreadedRenderer.java:398)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:190)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:173)
at java.lang.Thread.run(Thread.java:818)

This is what my onCreateWindow method looks like:

public boolean onCreateWindow(WebView view, final boolean dialog, final
boolean userGesture, final Message resultMsg) {
try {
if (!Config.isBlockPopups()) {
Log.w(TAG, "CREATE WINDOW for " + view.getOriginalUrl());
if (userGesture) {
WebView childView = new WebView(webBrowserActivity);
webBrowserActivity.addWebView(childView, true);
WebView.WebViewTransport transport =
(WebView.WebViewTransport) resultMsg.obj;
transport.setWebView(childView);
resultMsg.sendToTarget();
return true;

} else {

return false;
}
}else{
Toast.makeText(webBrowserActivity, R.string.popup_blocked,
Toast.LENGTH_LONG).show();
return false;
}
} catch (Throwable ex) {
Log.w(TAG, "Error creating window", ex);
return super.onCreateWindow(view,dialog,userGesture,resultMsg);
}

}

What is the expected behavior?

What went wrong?
The whole app crashes sometimes when opening popups.

Crashed report ID:

How much crashed? Whole browser

Is it a problem with a plugin? No

Did this work before? Yes Before Android 5.0

Chrome version: 37 Channel: n/a
OS Version: 5.0
Flash Version:

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Jan 14, 2015, 4:00:37 PM1/14/15
to chromi...@chromium.org
Updates:
Status: Assigned
Owner: b...@chromium.org

Comment #1 on issue 448389 by vad...@chromium.org: WebView crashes on
Hi Ben

Can you please take a look and route this to the right person. Thanks

chro...@googlecode.com

unread,
Jan 15, 2015, 6:13:42 AM1/15/15
to chromi...@chromium.org

Comment #2 on issue 448389 by b...@chromium.org: WebView crashes on opening
of popup
https://code.google.com/p/chromium/issues/detail?id=448389

Does the popup ever get displayed I wonder? Maybe this is happening when
the user tries to close the popup?

Without repro steps really hard to tell :-( The code you pasted looks right.

chro...@googlecode.com

unread,
Jan 15, 2015, 10:23:19 AM1/15/15
to chromi...@chromium.org

Comment #3 on issue 448389 by casol...@gmail.com: WebView crashes on
The user claims it happens immediately after it opens but I'm not certain
if that means after clicking on the link that opens it or after it shows up
on the screen.

I am going to make a webview app and maybe have it open a bunch of popups
with javascript and see how that goes, I'll repost here if I get it to
reproduce.

chro...@googlecode.com

unread,
Jan 15, 2015, 10:26:20 AM1/15/15
to chromi...@chromium.org

Comment #4 on issue 448389 by car...@instantbits.com: WebView crashes on

chro...@googlecode.com

unread,
Jan 16, 2015, 11:44:19 AM1/16/15
to chromi...@chromium.org

Comment #6 on issue 448389 by b...@chromium.org: WebView crashes on opening
of popup
https://code.google.com/p/chromium/issues/detail?id=448389

Are you leaving the popups open (i.e. not detaching/destroying WebView)? If
so, that native crash may be OOM from the graphics driver. It does seem a
different issue to the original report.

From the Play Console, can you tell if this is a specific device, or are
reports coming from multiple devices?

chro...@googlecode.com

unread,
Jan 16, 2015, 11:58:17 AM1/16/15
to chromi...@chromium.org

Comment #7 on issue 448389 by car...@instantbits.com: WebView crashes on
I am leaving them "open", basically hiding the view as there is a way to go
back to other "tabs". Is there a better way to handle that? On my actual
app I call onPause() on the webviews which are not visible.

On the Play Console I get the following:

Android version


Android 5.0.0

Device


Nexus 5 (hammerhead)

Nexus 10 (manta)

Nexus 7 (flo)

Nexus 7 (2012) (grouper)

Nexus 4 (mako)

Nexus 6 (shamu)

OnePlus One (A0001)

Nexus 9 (flounder)

Notice it says 5.0.0, but my user swears up and down he has 5.0.1 and his
report was there based on the message he set.

On Crashlytics, which I just started using, I have one report from 5.0.2
and this device XT1068/69. The main reason why I only have one report on
Crashlytics is that at the same time I started using it I also started
ignoring popups by default.

chro...@googlecode.com

unread,
Jan 16, 2015, 12:07:19 PM1/16/15
to chromi...@chromium.org

Comment #8 on issue 448389 by b...@chromium.org: WebView crashes on opening
of popup
https://code.google.com/p/chromium/issues/detail?id=448389

Is it possible that the user has ended up with many popups open and got
into this state that way? I'd suggest limiting the number the number of
popups open at one time.

IIRC, the Android Stock Browser app limited to 16 open tabs at any one time.

It's a bit hard to tell, but the original java crash looks like something
may be stuck inside the graphics driver (which the view system is waiting
on) causing the timeout.

chro...@googlecode.com

unread,
Jan 16, 2015, 12:10:18 PM1/16/15
to chromi...@chromium.org

Comment #9 on issue 448389 by car...@instantbits.com: WebView crashes on
It is very possible considering the sites they go to. I'll look into
implementing a limit.
Thank you for your help.

chro...@googlecode.com

unread,
Jan 16, 2015, 12:12:19 PM1/16/15
to chromi...@chromium.org

Comment #10 on issue 448389 by car...@instantbits.com: WebView crashes on
One more question, should I file a bug for that other crash,
the "release-keys" one? I've seen that come through on crash reports before
as well but since it looked pretty native I figured there wasn't much I
could do.

chro...@googlecode.com

unread,
Jan 16, 2015, 12:22:18 PM1/16/15
to chromi...@chromium.org

Comment #11 on issue 448389 by b...@chromium.org: WebView crashes on
Thanks, but I suspect that these may be the same (or closely related).
Unfortunately there isn't really much we can do here -- we're either
legitimately running out of memory, or hitting some other GPU driver bug.
If you still have either of these crashes after introducing a limit to the
number of popups that can be open at a time, please let me know.

Cheers

chro...@googlecode.com

unread,
Jan 16, 2015, 4:42:02 PM1/16/15
to chromi...@chromium.org

Comment #12 on issue 448389 by car...@instantbits.com: WebView crashes on
One more thing regarding the "release-keys" crash. I just had it happen on
my regular app with the popup blocker enabled.

Basically the "if (!Config.isBlockPopups()) {" check on the code above. It
happened after maybe 20 clicks on something that would otherwise open a
popup. I did have maybe 3 different webviews open at the time.
Reply all
Reply to author
Forward
0 new messages