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

Martin Fox duke at openjdk.java.net
Wed Jan 12 16:51:31 UTC 2022


On Wed, 12 Jan 2022 16:24:48 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m line 848:
>> 
>>> 846:             // If the contentView is set to nil within performKeyEquivalent: the OS will crash.
>>> 847:             NSView* dummy = [[NSView alloc] initWithFrame: NSMakeRect(0, 0, 10, 10)];
>>> 848:             [window->nsWindow performSelectorOnMainThread:@selector(setContentView:) withObject:dummy waitUntilDone:YES];
>> 
>> I'm not sure is needed or worth it, but maybe the `dummy` view should be released?
>
> That's a good question.

Yes, it should be released. I will update the PR.

-------------

PR: https://git.openjdk.java.net/jfx/pull/714


More information about the openjfx-dev mailing list