[
https://issues.apache.org/jira/browse/CB-5132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joe Bowser resolved CB-5132.
----------------------------
Resolution: Won't Fix
Assignee: Joe Bowser
OK, here is the write-up about Android WebView sucks once again:
First of all, this app crashes Android WebKit. It seems that the Test Lab
concatenates the giant stack trace that happens. Fortunately for us, I have a
Samsung Galaxy S4 for this very reason, and this has a massive stack trace:
/CallbackProxy(16559): UPDATE_URL
F/libc (16559): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread
16574 (WebViewCoreThre)
I/DEBUG ( 2465): *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
***
I/DEBUG ( 2465): Build fingerprint:
'samsung/ja3gub/ja3g:4.2.2/JDQ39/I9500UBUBMG9:user/release-keys'
I/DEBUG ( 2465): Revision: '10'
I/DEBUG ( 2465): pid: 16559, tid: 16574, name: WebViewCoreThre >>>
org.apache.webviewsanity <<<
So, from here, you can see that the CallbackProxy is sending the loadURL call
to WebKit using UpdateUrl. Then it crashes because it's unable to render it
for some reason. It seems to blame SKIA for it, and I don't know why.
Now, I tested it with a stock WebView as well as with Cordova. For reference,
here's my test code (excluding imports):
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView view = (WebView) findViewById(R.id.appView);
WebSettings settings = view.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
view.loadUrl("file:///android_asset/index.html");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
}
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/appView" />
</RelativeLayout>
This is taken pretty much from the WebKit example. We can't easily fix this
without providing an alternate WebView, which is a very long way off. :(
> Certain Types Of Async Activity + ClickBusting + Cordova + Android Galaxy S4
> = unexpected exit
> ----------------------------------------------------------------------------------------------
>
> Key: CB-5132
> URL: https://issues.apache.org/jira/browse/CB-5132
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.1.0
> Environment: Galaxy S4 running Android 4.2.2. I've been unable to
> replicate the bug on emulators. The bug only shows up on actual devices.
> Fortunately, Samsung makes them available via
> http://developer.samsung.com/remotetestlab
> Reporter: Rich Trott
> Assignee: Joe Bowser
> Attachments: s4-angular-cordova-bug.tgz
>
>
> I created a repo with more-or-less minimal code to demonstrate the issue:
> https://github.com/Trott/s4-angular-phonegap-crash
> I've also attached it as a gzipped tar file to this ticket.
> The app exits (in a "oh, hey, I crashed, I'm outta here!" kind of way) when
> run on a Galaxy S4 running Android 4.2.2. It runs fine on every other device
> I've tested it on. For example, there is no problem on a Galaxy Note II
> running Android 4.1.2.
> The www directory stuff also works fine in browsers, including browsers on
> the S4/Android 4.2.2 device.
> So the bug only seems to happen when this code is:
> * Run as a Cordova app
> * On a Galaxy S4 running Android 4.2.2
> Steps to duplicate the behavior (which are also listed in the repo's README)
> are:
> 1. Clone the
> 2. Create the Android executable using Cordova. With `cordova` command line
> tool and Android SDK installed:
> - `cordova platform add android`
> - `cordova build`
> 3. Take the resulting APK and install it on a Galaxy S4 running Android
> 4.2.2. If you don't own one, you can test with one for free at
> http://developer.samsung.com/remotetestlab.
> 4. Launch the app.
> 5. Touch the text on the app's main screen.
> 6. Wait a few seconds and the app will exit.
> On everything else I've tested, it loads the color list content, which is the
> expected behavior.
> This shows up in the Android logs, at least when using
> http://developer.samsung.com/remotetestlab:
> ERROR|10-19 03:39:49.448|6938|6938||CallbackProxy|UPDATE_URL
> ASSERT|10-19 03:39:49.493|6938|6953||libc|Fatal signal 11 (SIGSEGV) at
> 0x00000000 (code=1), thread 6953 (WebViewCoreThre)
> I put this information in a question on StackOverflow
> (http://stackoverflow.com/q/19459111/436641). It has attracted some helpful
> comments from one individual, but so far that's it.
> In addition to Cordova 3.1.0, I also tried it with cordova-3.2.0-dev.jar
> compiled from [the cordova-android repo][3] at commit
> 28c41294bba746c75beae0ab26a42c8412cc665a (most recent commit to master as of
> October 20, 2013, which is today). No change in behavior--the app still exits
> unexpectedly.
--
This message was sent by Atlassian JIRA
(v6.1#6144)