-
Notifications
You must be signed in to change notification settings - Fork 541
8350976: MenuBarSkin: exception initializing in a background thread #1727
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
8350976: MenuBarSkin: exception initializing in a background thread #1727
Conversation
|
👋 Welcome back angorya! A progress list of the required criteria for merging this PR into |
|
@andy-goryachev-oracle 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 18 new commits pushed to the
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 |
|
/reviewers 2 |
|
@andy-goryachev-oracle |
Webrevs
|
| ListenerHelper lh = ListenerHelper.get(this); | ||
|
|
||
| if (Platform.isFxApplicationThread()) { | ||
| if (Toolkit.getToolkit().getSystemMenu().isSupported()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could move this check to the outer scope, because if it evalutes to false, we can skip both branches of if (Platform.isFxApplicationThread()) { completely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what you mean exactly.
Toolkit.getToolkit().getSystemMenu().isSupported() must be called in the fx application thread, and the rest of the changes were done to minimize the structural changes.
lukostyra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, verified on Windows 11 - test fails without fix and works with it.
|
menuBar test passes even without the fix in macOS. |
That's strange: for me it fails in the current master branch (the line number is different bc I just appended the test to the end of file). macOS 15.3.2. |
|
Previously i had commit until march 26 so again i synced the code to latest master branch build it and then took the changes from this PR( In the test results also i can see menuBar test as passed. |
|
Are you saying that the test taken from this PR passes when added to the current master branch? If so, I wonder if the laptop/os version might be relevant: I am testing with macOS 15.3.2 on M1 silicon, and the test from this PR fails with the master branch. (I also do a clean build before running the test). Can you try running on a different machine (maybe Windows?) |
|
Yes updated NodeInitializationStressTest with master branch code passes on my M1 macOS 14.7.4 Macbook pro laptop. I again checked with clean build. Also since i am working Ubuntu 24.04 issues, i tested with clean master branch build and updated test. Here also i see that the menuBar test passes with master branch build. I have little order setup on my Windows with older toolchain, once i make it work on latest code i will share my findings. |
|
More info i am running this test using below command: |
|
Do you have the |
|
I also have macOS 14 (14.7.4 to be exact). @jayathirthrao Can you double-check that you were actually running the version of the test from this PR (without the fix)? The easiest way to do that, which will also save you a bunch of time, is to run just that one test method (although it fails for me if I run the whole thing, |
|
The only way this functionality is suppressed is when |
There is no easy way to set this, so I'm almost certain that isn't the case here. Jay can confirm, but I think there is a much easier explanation: I suspect that it didn't run the new test method in question. Thus my earlier comment above about running that test in isolation. |
|
I ran his |
|
For test verification i was following what i do in JDK of checking out the branch in the PR and without build verify that the test fails and then build the branch(which will build source code change also) and then make sure test passes. Got to know that we need to use -PTEST_ONLY=true in FX to make sure that source code changes are not built when i use gradle to run the test. With this approach i can see that the test fails without product change and passes with it :) |
|
The mystery solved! Thank you @jayathirthrao ! |
|
Going to push as commit 4a4272b.
Your commit was automatically rebased without conflicts. |
|
@andy-goryachev-oracle Pushed as commit 4a4272b. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Allows MenuBar to be created in a background thread by delaying MenuBarSkin::rebuildUI() call until after the MenuBar becomes a part of the scene graph.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1727/head:pull/1727$ git checkout pull/1727Update a local copy of the PR:
$ git checkout pull/1727$ git pull https://git.openjdk.org/jfx.git pull/1727/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1727View PR using the GUI difftool:
$ git pr show -t 1727Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1727.diff
Using Webrev
Link to Webrev Comment