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

8263788: JavaFX application freezes completely after some time when using the WebView #461

Closed
wants to merge 3 commits into from

Conversation

@arun-Joseph
Copy link
Member

@arun-Joseph arun-Joseph commented Apr 12, 2021

Issue: Java application (with WebView) will completely freeze after using it for a while.

Fix: Use native isMainThread functions instead of JNI call.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8263788: JavaFX application freezes completely after some time when using the WebView

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/461/head:pull/461
$ git checkout pull/461

Update a local copy of the PR:
$ git checkout pull/461
$ git pull https://git.openjdk.java.net/jfx pull/461/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 461

View PR using the GUI difftool:
$ git pr show -t 461

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/461.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 12, 2021

👋 Welcome back ajoseph! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@arun-Joseph arun-Joseph marked this pull request as ready for review Apr 15, 2021
@openjdk openjdk bot added the rfr label Apr 15, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 15, 2021

Webrevs

@kevinrushforth kevinrushforth self-requested a review Apr 15, 2021
@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Apr 15, 2021

/reviewers 2

@openjdk
Copy link

@openjdk openjdk bot commented Apr 15, 2021

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

Copy link
Member

@kevinrushforth kevinrushforth left a comment

The code changes look good. I still need to test it. Speaking of which, I presume you've tested this on all three platforms?

I left one question inline.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Apr 15, 2021

@johanvos, @arapte, or @guruhb can one of you be the second reviewer?

Copy link
Member

@kevinrushforth kevinrushforth left a comment

A non-debug build crashes for me on startup in the com.sun.webkit.WebPage.twkCreatePage method on both Windows and Mac.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Apr 16, 2021

A non-debug build crashes for me on startup in the com.sun.webkit.WebPage.twkCreatePage method on both Windows and Mac.

Never mind. This was a build error on my part. I've corrected my mistake and will rerun the test. Sorry for the noise.

@kevinrushforth kevinrushforth self-requested a review Apr 16, 2021
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Tested on all three platforms. Looks good.

@PrimosK
Copy link

@PrimosK PrimosK commented Apr 19, 2021

A production build using this fix doesn't solve it. Application still freezes.

We will provide you with updated thread dump generated from debug build including this fix (and with assertions disabled) in the following days.

@PrimosK
Copy link

@PrimosK PrimosK commented Apr 20, 2021

Please discard my previous comment.

After building a debug version we can't reproduce it anymore.

I will try to create another production build and test it out once more. Will let you know how it goes.

@PrimosK
Copy link

@PrimosK PrimosK commented Apr 20, 2021

We've created another production build and it seems to be working fine! Application doesn't hang anymore! Sorry for false alarm - it looks like our previous production build procedure had flaws (might be I've checked out wrong pull request).

BTW - thank you guys for all hard work needed to fix this one.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Apr 20, 2021

@PrimosK Good to hear. Thank you for your help in verifying the fix. Arun will integrate the fix once a second reviewer has approved it.

guruhb
guruhb approved these changes Apr 20, 2021
Copy link
Collaborator

@guruhb guruhb left a comment

Looks good to me .
Tested on Windows with Modified WebView which loads multiple URL every 30 seconds (executed for 30 min and didn't find any freeze or crash).

@openjdk
Copy link

@openjdk openjdk bot commented Apr 20, 2021

@arun-Joseph This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8263788: JavaFX application freezes completely after some time when using the WebView

Reviewed-by: kcr, ghb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 9 new commits pushed to the master branch:

  • 67828ae: 8261840: Submenus close to screen borders are no longer repositioned
  • af75a1f: 8265439: [TestBug] Enable and fix ignored unit tests in MenuItemTest
  • e02cee9: 8264990: WebEngine crashes with segfault when not loaded through system classloader
  • a683558: 8259356: MediaPlayer's seek freezes video
  • 56f2e17: 8088739: [TestBug] RegionBackgroundImageUITest fail with timeout error
  • 8e54757: 8089589: [ListView] ScrollBar content moves toward-backward during scrolling.
  • 05ab799: 8208088: Memory Leak in ControlAcceleratorSupport
  • e8689fe: 8265031: Change default macOS min version for x86_64 to 10.12 and aarch64 to 11.0
  • c8384a1: 8264928: Update to Xcode 12.4

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Apr 20, 2021
@arun-Joseph
Copy link
Member Author

@arun-Joseph arun-Joseph commented Apr 20, 2021

/integrate

@openjdk openjdk bot closed this Apr 20, 2021
@openjdk openjdk bot added the integrated label Apr 20, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Apr 20, 2021

@arun-Joseph Since your change was applied there have been 9 commits pushed to the master branch:

  • 67828ae: 8261840: Submenus close to screen borders are no longer repositioned
  • af75a1f: 8265439: [TestBug] Enable and fix ignored unit tests in MenuItemTest
  • e02cee9: 8264990: WebEngine crashes with segfault when not loaded through system classloader
  • a683558: 8259356: MediaPlayer's seek freezes video
  • 56f2e17: 8088739: [TestBug] RegionBackgroundImageUITest fail with timeout error
  • 8e54757: 8089589: [ListView] ScrollBar content moves toward-backward during scrolling.
  • 05ab799: 8208088: Memory Leak in ControlAcceleratorSupport
  • e8689fe: 8265031: Change default macOS min version for x86_64 to 10.12 and aarch64 to 11.0
  • c8384a1: 8264928: Update to Xcode 12.4

Your commit was automatically rebased without conflicts.

Pushed as commit 49d2126.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@arun-Joseph arun-Joseph deleted the 8263788 branch Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants