Debugging Android 2.3 browser crashes
Asked Answered
D

1

7

Recently, I've been trying to find (and hopefully, fix) frequent Android 2.3 browser crashes that affect the SB Nation blog network. Users will navigate to page and it will appear to load, and then about when you'd expect the DOM complete to fire, the browser appears to forcibly close and you are kicked to the home screen. This doesn't happen on every page load, so if you open the browser and try again, it will often load fine.

I have recreated the issue multiple times on my own phone, an HTC Thunderbolt (2.3.4) as well as a Droid Bionic (2.3.4). I have no Android development experience, but I assumed that hooking up the adb debugger may give me some insight into the the cause of this problem. Here are some of the logs of the crash I have captured:

(I'd post some URLS on production that have caused these crashes, but I'm already at my two link limit.)

As you may notice, all the HTC logs differ, and the Bionic ones don't seem to offer much technical detail. This is the only common thread I found in all the HTC logs:

 D/skia    (14225): createPlugin (300,150) screen proportion:(w,h)=(0.813008,0.039288), content ratio:2.000000 mainUrl:http://athleticsnation.local:3000/
 D/skia    (14225): createPlugin F10 typical2 video content (300,150)/(369,3818), url=

My guess was F10 == Flash 10, but the Droid Bionic doesn't even have Flash installed, so I'm not convinced that is the cause.

At any rate, I'm at a loss for theories on what is causing these crashes. Is there a way to get more accurate information about these crashes? Could invalid markup be causing the browser to crash? JavaScript limitations? Any help would be greatly appreciated.

Damselfish answered 13/11, 2012 at 17:41 Comment(6)
If you've run the links on emulator what is the logcat output (add it to the question). Also don't forget to enable console.log() #5539016Kaleb
In both cases Browser is killed by signal 11 (Segmentation fault) meaning that the native Browser libraries did something like a NullPointerException. That's not intended to be possible via bad markup and any webcontent but since there is a mention of plugins and video it's probably something with (HTML5?) video. skia btw is the 2d graphic / drawing library.Drugget
@MorrisonChang My attempts to recreate the crash in the 2.3.3 emulator have so far been unsuccessful. If I manage to repro there, I'll post a logcat.Damselfish
@Drugget The seg fault bit makes sense. I wonder if it's a browser bug, and something on these pages is exacerbating the problem. There are no <video> tags on these pages (example: bruinsnation.com/2012/11/11/3631264/…), so probably not that.Damselfish
@Damselfish Yes, segfault would be a browser bug somehow triggered by your content (or even random events with side-effects happening on the device). It should display a blank / broken page or something like that if it was okay. Regarding emulator: there are lot's of differences between the emulator and a real device, so it's possible that you can't reproduce that bug on the emulator.Drugget
Seems to be the same bug reported here: forum.xda-developers.com/showthread.php?p=11105749#post11105749Drugget
C
1

Probably worth looking at location permissions (and exception handling) around allowed_geolocation_origins():

From HTC dump:

10: W/ContentService( 1646): binderDied() at ObserverNode name allowed_geolocation_origins

Chesnut answered 13/11, 2012 at 18:50 Comment(3)
Good catch! However, I don't understand how a web page would be causing problems with allowed_geolocation_origins, which seems to be part of the core Android API. To my knowledge, we aren't trying to use HTML5 geolocation or anything on these pages, which is the only link I can think of. Maybe a red herring?Damselfish
Tricky to say - there are at least 8 js libraries loading (including ad networks, Twitter, Facebook, Google analytics), a fair amount of broken markup, and 4 hidden frames, each including complex 3rd party libs. See: imgur.com/WUKRn and imgur.com/7YRPV.Chesnut
Even if there is no request for location from your page, Browser has to observe the allowed location setting for changes. Meaning it could be related but it doesn't have to. You get Binder death warnings when a process crashed that was connected via a binder to another process. I'd say that warning is a result of the crash, not a reasonDrugget

© 2022 - 2024 — McMap. All rights reserved.