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

Find in page freeze #6326

Closed
bambooCZ opened this issue Dec 12, 2017 · 8 comments
Closed

Find in page freeze #6326

bambooCZ opened this issue Dec 12, 2017 · 8 comments
Assignees

Comments

@bambooCZ
Copy link

bambooCZ commented Dec 12, 2017

webview.find(...) freezes app then multiple webviews are present and one of them has transferred from display: none. It is hard to tell details because NWjs becomes completelly unresponsive...

Chromium 61 behaves exactly the same, Chromium >= 62 is ok.
NWjs 0.27.1 still freezes. Replicable on macOS >= 10.12, Windows >=7. I haven't tested it on Linux.

screencast

Manual steps:

  1. Click "Switch webviews" - this will toggle display:none on the webviews
  2. Type something into the input - it will call webview.find(input.value, {}, function(){ ... }) on the currentlly visible webview

find-in-page-trouble.zip

@Christywl
Copy link
Contributor

I can reproduce this issue on Linux/Windows with nwjs-sdk-v0.27.1.

@janRucka
Copy link
Contributor

janRucka commented Dec 13, 2017

I was able to reproduce it with Chrome 62 under Win7. 63 is Ok thought. But NWjs27 (as well as NWjs26) is freezing to me.

It seems that it ends up infinitely stuck in this loop:
https://github.com/nwjs/chromium.src/blob/nw27/content/browser/find_request_manager.cc#L632

@rogerwang
Copy link
Member

The code path is affected by a feature GuestViewCrossProcessFrames, which is under field trial control in Chrome (not Chromium). I guess that's why you two see different results. This feature is disabled in NW but enabled in Chromium.

@rogerwang
Copy link
Member

Use the following patch seems to fix it. Need to figure out #6171 where we use this as workaround.

diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index fb13c42ee5c7..e3b8bd3735fa 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -1420,8 +1420,8 @@
             ],
             "experiments": [
                 {
-                    "name": "Disabled",
-                    "disable_features": [
+                    "name": "Enabled",
+                    "enable_features": [
                         "GuestViewCrossProcessFrames"
                     ]
                 }

@bambooCZ
Copy link
Author

bambooCZ commented Dec 13, 2017

Sufficient solution is to put "chromium-args": "--enable-features=GuestViewCrossProcessFrames" into package.json.

Thank you @rogerwang

But do we agree it is only a hotfix? And this issue should be fixed without chromium-args magic?

EDIT: It solves the infinite loop, but it breaks some other webview and focus related things...

@rogerwang
Copy link
Member

Could you please file more issues for those and CC #6171 ? I look to enable GuestViewCrossProcessFrames by default as upstream is moving towards that.

@rogerwang
Copy link
Member

I just pushed a real fix for #6171 with GuestViewCrossProcessFrames turned on. You could try if it fixes your issues with the next nightly build.

@rogerwang
Copy link
Member

close as it's fixed by enabling GuestViewCrossProcessFrames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants