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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

8242544: CMD+ENTER key event crashes the application when invoked on dialog #714

Closed
wants to merge 2 commits into from

Conversation

beldenfox
Copy link
Contributor

@beldenfox beldenfox commented Jan 11, 2022

The OS crashes if the contentView of a window is set to nil while handling processKeyEquivalent. With this PR we just set the contentView to a basic do-nothing NSView for the interim.


Progress

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

Issue

  • JDK-8242544: CMD+ENTER key event crashes the application when invoked on dialog

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 714

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 11, 2022

馃憢 Welcome back beldenfox! 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.

@openjdk openjdk bot added the rfr label Jan 11, 2022
@mlbridge
Copy link

mlbridge bot commented Jan 11, 2022

Webrevs

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 12, 2022

Note: This PR proposes an alternative fix to the one put forth in #704. This fix is simpler and less intrusive.

/reviewers 2

@openjdk
Copy link

openjdk bot commented Jan 12, 2022

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

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 12, 2022

The fix looks good, and as mentioned above, is minimally intrusive. I also ran a full set of tests with no problems. It would be helpful to add a manual test as part of this PR (maybe based on the test from the bug report).

Copy link
Collaborator

@johanvos johanvos left a comment

This looks good with the current tools/OS behaviour. It is still a bit of a hack, which may result in unexpected behaviour when the macos-specific tools change.
But this is a general observation with macos, so I believe this is indeed the best (and least intrusive way) to prevent the crashes.

Copy link
Collaborator

@jperedadnr jperedadnr left a comment

This PR fixes the JDK-8242544 issue as intended. I've added a couple of minor comments.

Regarding #704, which also fixed the related issue JDK-8205915 but was targeting JDK-8242544, maybe it should be just updated to target the former?

Copy link
Member

@kevinrushforth kevinrushforth left a comment

In the interest of getting as much testing as possible, I'm approving this fix now. If there isn't time to add a manual test, then it can be done in the jfx18 branch during RDP1.

@openjdk
Copy link

openjdk bot commented Jan 12, 2022

@beldenfox 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:

8242544: CMD+ENTER key event crashes the application when invoked on dialog

Reviewed-by: jpereda, kcr

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@johanvos, @jperedadnr, @kevinrushforth) but any other Committer may sponsor as well.

鉃★笍 To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Jan 12, 2022
@openjdk openjdk bot removed the ready label Jan 12, 2022
@openjdk openjdk bot added the ready label Jan 12, 2022
@beldenfox
Copy link
Contributor Author

beldenfox commented Jan 12, 2022

The manual test for this can also cover JDK-8205915 (a Cmd-based shortcut can be processed by two separate windows). This crash was blocking testing on that bug. I'll submit a fix for JDK-8205915 along with the manual test tomorrow.

@beldenfox
Copy link
Contributor Author

beldenfox commented Jan 12, 2022

/integrate

@openjdk openjdk bot added the sponsor label Jan 12, 2022
@openjdk
Copy link

openjdk bot commented Jan 12, 2022

@beldenfox
Your change (at version f71d80f) is now ready to be sponsored by a Committer.

@kevinrushforth
Copy link
Member

kevinrushforth commented Jan 12, 2022

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 12, 2022

Going to push as commit a2a0acf.

@openjdk openjdk bot added the integrated label Jan 12, 2022
@openjdk openjdk bot closed this Jan 12, 2022
@openjdk openjdk bot removed the ready label Jan 12, 2022
@openjdk openjdk bot removed rfr sponsor labels Jan 12, 2022
@openjdk
Copy link

openjdk bot commented Jan 12, 2022

@kevinrushforth @beldenfox Pushed as commit a2a0acf.

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

@beldenfox beldenfox deleted the crashme branch Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated
4 participants