Android WebView: crash after url loading
<p>When loading an url with my webView, application crashes after few seconds (without error log...). </p>

<p>My Code :</p>

<pre><code> wv = new WebView(this);
        wv.clearCache(true);
        wv.clearHistory();
        wv.getSettings().setJavaScriptEnabled(true);
        wv.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);

        wv.setDownloadListener(new DownloadListener() {
            @Override
            public void onDownloadStart(String url, String userAgent,
                                        String contentDisposition, String mimetype, long contentLength) {
                Intent intent = new Intent(Intent.ACTION_VIEW);
                intent.setType(mimetype);
                intent.setData(Uri.parse(url));
                startActivity(intent);
            }
        });


        wv.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {

                // TODO change for other domains
                URL nextUrl;
                try {
                    nextUrl = new URL(url.toString());
                }catch (MalformedURLException e){
                    nextUrl = null;
                }

                if(nextUrl !=null &amp;&amp; nextUrl.getHost().toString().equals(DOMAIN)) {
                    Toast.makeText(mContext, nextUrl.getHost().toString(), Toast.LENGTH_SHORT).show();
                    view.loadUrl(url);
                    return false;

                }else{
                    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                    startActivity(browserIntent);
                    return true;
                }

            }
        });

        wv.setWebChromeClient(new WebChromeClient() {
            public void onProgressChanged(WebView view, int progress) {
                MainActivity.this.setProgress(progress * 1000);
            }
            public boolean onConsoleMessage(ConsoleMessage cm) {
                Log.d("MyProject: WebView: ", cm.message() + " -- From line "
                    + cm.lineNumber() + " of "
                    + cm.sourceId() );
            return true;
        }
        });

        wv.loadUrl(URL);
        setContentView(wv);
</code></pre>

<p>Log :</p>

<pre><code>01-20 18:00:50.798    7233-7288/ my.appli.com I/dalvikvm﹕ "WebViewCoreThread" prio=5 tid=12 NATIVE
01-20 18:00:50.798    7233-7288/ my.appli.com I/dalvikvm﹕ | group="main" sCount=0 dsCount=0 obj=0x419a0be0 self=0x68f6c750
01-20 18:00:50.798    7233-7288/ my.appli.com I/dalvikvm﹕ | sysTid=7288 nice=10 sched=0/0 cgrp=apps/bg_non_interactive handle=1773204176
01-20 18:00:50.799    7233-7288/ my.appli.com I/dalvikvm﹕ | state=R schedstat=( 0 0 0 ) utm=2326 stm=119 core=0
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ #00  pc 000012a0  /system/lib/libcorkscrew.so (unwind_backtrace_thread+27)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ #01  pc 0006235c  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+35)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ #02  pc 000561bc  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+303)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ #03  pc 00056256  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ #04  pc 000478c8  /system/lib/libdvm.so (dvmDebuggerSignalHandler(int, siginfo*, void*)+15)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.webkit.JWebCoreJavaBridge.sharedTimerFired(Native Method)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.webkit.JWebCoreJavaBridge.fireSharedTimer(JWebCoreJavaBridge.java:92)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:108)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.os.Handler.dispatchMessage(Handler.java:99)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.os.Looper.loop(Looper.java:137)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:900)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ at java.lang.Thread.run(Thread.java:856)
01-20 18:00:50.841    7233-7288/ my.appli.com I/dalvikvm﹕ [ 01-20 18:00:50.841  7233: 7288 F/libc     ]
    Fatal signal 11 (SIGSEGV) at 0x0000001c (code=1), thread 7288 (WebViewCoreThre)
</code></pre>

<p>I've experienced the same issue(crash) when trying to load the same URL with the default browser of my android device(4.1). </p>

<p>The URL I want to load is :</p>

<p><a href="http://presentbox.jp" rel="nofollow">http://presentbox.jp</a></p>

<p>Thank you for your help.</p>

<p>--- EDIT 1</p>

<p>I' ve tried with a recent android phone (4.4) and application didn't crashed.</p>

<p>For debug purpose, I've deleted all heavy parts of my website (images, js,...) but application still crash after scrolling down.</p>