androidwebviewandroid-webviewwebviewclient

App crash after reloading url inside webview


I have an app which contain WebView. On app laucnh webview loading url (html5 game). Also i have a button which reloading this url. And after i click it app crash with this error

/com.i.demogame A/libc: Fatal signal 5 (SIGTRAP), code 1 in tid 5151 (TaskSchedulerFo), pid 5019 (com.i.demogame)
/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
/? A/DEBUG: Build fingerprint: 'xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V10.2.1.0.OEIMIXM:user/release-keys'
/? A/DEBUG: Revision: '0'
/? A/DEBUG: ABI: 'arm64'
/? A/DEBUG: pid: 5019, tid: 5151, name: TaskSchedulerFo  >>> com.i.demogame <<<
/? A/DEBUG: signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x7bc2ae4558
/? A/DEBUG:     x0   0000007bbccb37c0  x1   0000007bba8b9ee0  x2   0000000000000400  x3   0000007c5ce277e0
/? A/DEBUG:     x4   0000000000000000  x5   8080800000000080  x6   fefeff7abbca33ff  x7   7f7f7f7fffff7f7f
/? A/DEBUG:     x8   0000000000000000  x9   0000000000000000  x10  0000000000004001  x11  0000000000000000
/? A/DEBUG:     x12  0000000000000018  x13  ffffffffffffffff  x14  ffffffffff000000  x15  ffffffffffffffff
/? A/DEBUG:     x16  0000007c5ce252c8  x17  0000007c5cdc2c48  x18  000000007030edc8  x19  0000007bbccb3c38
/? A/DEBUG:     x20  0000007bbccb3c30  x21  000000000000004f  x22  0000007c5ce277e0  x23  0000007bc45fb000
/? A/DEBUG:     x24  0000007bc4991000  x25  0000007bbccb3789  x26  0000007bbccb4588  x27  0000007bbccb3788
/? A/DEBUG:     x28  0000007bc4993000  x29  0000007bbccb3c20  x30  0000007bc2ae4428
/? A/DEBUG:     sp   0000007bbccb3780  pc   0000007bc2ae4558  pstate 0000000080000000
/? A/DEBUG: backtrace:
/? A/DEBUG:     #00 pc 000000000115a558  /data/app/com.android.chrome-5KWWkw0oW8oszQoOw9Gdsw==/base.apk (offset 0xf2e000)
/? A/DEBUG:     #01 pc 000000000115a424  /data/app/com.android.chrome-5KWWkw0oW8oszQoOw9Gdsw==/base.apk (offset 0xf2e000)

I already tried to reload by :

webview.reload();
webview.loadurl(url);
webView.loadUrl( "javascript:window.location.reload( true )");

I found some questions with the same problem but non of them helped me.


Solution

  • I just tried to make ui methods calls inside WebView. So solution is to check your webview for some UI calls.