-
Notifications
You must be signed in to change notification settings - Fork 542
8231372: JFXPanel fails to render if setScene called on Swing thread #362
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
8231372: JFXPanel fails to render if setScene called on Swing thread #362
Conversation
Secondary event loop introduced as a means of synchronization with the JavaFX Application thread in [1] never terminates as the SecondaryLoop.exit() call is not reached because the thread is blocked in the SecondaryLoop.enter() call. This patch fixes the problem by submitting the UI work (including the call to the SecondaryLoop.exit() method) before entering the secondary loop. [1] openjdk@7cf2dfa
|
👋 Welcome back kcr! A progress list of the required criteria for merging this PR into |
|
@kevinrushforth Setting summary to |
|
@kevinrushforth |
|
/reviewers 2 |
|
@kevinrushforth |
Webrevs
|
|
I noticed that the Swing |
|
@kevinrushforth 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: 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 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
/integrate |
|
@kevinrushforth Since your change was applied there have been 3 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 794ffc0. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This fix was originally proposed by @mruzicka in PR #16 which was closed several months ago without being integrated. At the time we didn't have a test case that was failing.
While evaluating a bug that I filed, JDK-8235843, I discovered that that bug was a duplicate of this one. The original proposed fix is correct, although I modified it slightly to add a try / finally so that the secondary event loop will be terminated even if the setScene throws an exception. I also added a unit test. Since the bulk of the fix is from PR #16, I will add the contributor of that PR.
NOTE to reviewers: I pushed two commits to my branch. The first is exactly the commit created for PR #16 and the second is the unit test along with the fix to the code to add try / finally. As always, they will be squashed into a single commit by Skara.
/summary Correctly terminate secondary event loop in JFXPanel::setScene
/contributor add Michal Růžička michal.ruza@gmail.com
Progress
Issue
Reviewers
Contributors
<michal.ruza@gmail.com>Download
$ git fetch https://git.openjdk.java.net/jfx pull/362/head:pull/362$ git checkout pull/362