Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebView crashing when entering text in input field #9

Closed
dgoenka opened this issue Jul 6, 2019 · 5 comments
Closed

WebView crashing when entering text in input field #9

dgoenka opened this issue Jul 6, 2019 · 5 comments
Labels
good first issue Good for newcomers

Comments

@dgoenka
Copy link

dgoenka commented Jul 6, 2019

I'm using this webview in my project, and though it has helped improved performance generally, I am facing a critical issue. Whenever I highlight any input field on the web page and enter text, the app crashes. The following is the log, please help:

07-06 22:28:28.107 my.package.name 28600 29068 F libc Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 29068 (Chrome_InProcRe), pid 28600 (ters.in.android) 07-06 22:28:28.278 31234 - F crash_dump64 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 07-06 22:28:28.278 31234 - F crash_dump64 Build fingerprint: 'google/walleye/walleye:8.1.0/OPM1.171019.011/4448085:user/release-keys' 07-06 22:28:28.278 31234 - F crash_dump64 Revision: '0' 07-06 22:28:28.278 31234 - F crash_dump64 ABI: 'arm64' 07-06 22:28:28.278 31234 - F crash_dump64 pid: 28600, tid: 29068, name: Chrome_InProcRe >>> my.package.name <<< 07-06 22:28:28.278 31234 - F crash_dump64 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 07-06 22:28:28.278 31234 - F crash_dump64 Cause: null pointer dereference 07-06 22:28:28.278 31234 - F crash_dump64 x0 0000000000000000 x1 4e0c5ae2146e7b1d x2 4e0c5ae2146e7b1d x3 0000007a068ba9f0 07-06 22:28:28.278 31234 - F crash_dump64 x4 0000007951afe7b8 x5 0000007951afead4 x6 4f505f5321300117 x7 0000000007909d1c 07-06 22:28:28.278 31234 - F crash_dump64 x8 0000000000000000 x9 0000000000000002 x10 0000000000000001 x11 0000000000000000 07-06 22:28:28.278 31234 - F crash_dump64 x12 0000000000000003 x13 ffffffffffffffff x14 ffffffff00000000 x15 ffffffffffffffff 07-06 22:28:28.278 31234 - F crash_dump64 x16 0000007956c1de68 x17 0000007a06848208 x18 00000000fff6f3b2 x19 0000000000000001 07-06 22:28:28.278 31234 - F crash_dump64 x20 0000007951afec5c x21 0000007951afec58 x22 0000007951affe7e x23 0000007951afec60 07-06 22:28:28.279 31234 - F crash_dump64 x24 0000000000000001 x25 0000000000000001 x26 0000000000000000 x27 0000007951afecff 07-06 22:28:28.279 31234 - F crash_dump64 x28 0000000000000000 x29 0000007951afebc0 07-06 22:28:28.279 31234 - F crash_dump64 sp 0000007951afebc0 lr 0000007955ef02d4 pc 0000007955ef02d4 07-06 22:28:28.285 31234 - F crash_dump64 07-06 22:28:28.285 31234 - F crash_dump64 backtrace: 07-06 22:28:28.285 31234 - F crash_dump64 #00 pc 0000000002dcf2d4 /data/app/my.package.name-YySnZ8rkcGdNNWlHU43E7w==/lib/arm64/libxwalkcore.so 07-06 22:28:29.384 tombstoned 590 - E /system/bin/tombstoned Tombstone written to: /data/tombstones/tombstone_02 07-06 22:28:29.403 lmkd 515 - E lowmemorykiller Error writing /proc/28600/oom_score_adj; errno=22

@dgoenka
Copy link
Author

dgoenka commented Jul 8, 2019

This is not exactly a fault of the library, but a problem reported by even others within Crosswalk itself:

crosswalk-project/crosswalk#4028
https://stackoverflow.com/questions/44868827/react-native-make-webview-on-android-behave-the-same-as-on-iphone?rq=1

Notice the last response, it suggests using the "full" version fixed the issue for them. What is the full version, and can we simply use that instead?

@fantasy525
Copy link
Owner

@dgoenka Hi,please see readme Notes, hope can help you.

In development mode(yarn start) ,You should add the following code to MainApplication.java onCreate lifecyle

@Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
    new XWalkView(this).onDestroy();  // just add this line for RN dev mode,and release mode you can delete it
  }

Because when you open the WebView page input box to enter text, app will crash,may be activity change ApplicationContext when activity onResume,so we need init XWalkView on Create,some variables may be static ,so it get value onCreate,and It's exactly what XWalkView runtime need. and I hope react-native can fix this for later version,and it happend in development mode,release mode is OK,so you can delete in release mode

@dgoenka
Copy link
Author

dgoenka commented Aug 13, 2019

This issue was occurring even though I had removed that line in the release mode.. it is actually a problem within the crosswalk library, some other people have noticed it too (I can provide the links if you want). Unfortunately, the Crosswalk library is no longer maintained, so I had to finally revert to the Android WebView finally. On the bright side, the performance is comparable now. Someone has apparently made a fork of the crosswalk project and fixed it, but you will need an EC2 instance to compile it 😂

@dgoenka dgoenka closed this as completed Aug 13, 2019
@fantasy525
Copy link
Owner

@dgoenka give me links,thank you

@dgoenka
Copy link
Author

dgoenka commented Aug 16, 2019

crosswalk-project/crosswalk#4028
There is one more discussion, that I am unable to find, which mentions (and I tried) that the app will crash when double tap / long tap on an input field with the crosswalk webview, but cannot find the link now. In that discussion, one participant had mentioned that they have made a fork with a fix, but you need an EC2 instance to compile it.

@fantasy525 fantasy525 pinned this issue Sep 15, 2019
@fantasy525 fantasy525 unpinned this issue Sep 15, 2019
@fantasy525 fantasy525 added the good first issue Good for newcomers label Sep 15, 2019
@fantasy525 fantasy525 pinned this issue Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants