[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: RFR: 8273485: Deadlock when also using Swing and exiting Fullscreen on Mac [v7]
From:       Kevin Rushforth <kcr () openjdk ! java ! net>
Date:       2021-10-30 20:39:47
Message-ID: QnDJ9RvWlkvmTioHzkpJBgqMLe2aeMwc5SO_LlPskqk=.ee64f16e-693f-4b0e-b820-3854be6df339 () github ! com
[Download RAW message or body]

On Mon, 18 Oct 2021 08:20:22 GMT, Florian Kirmaier <fkirmaier@openjdk.org> wrote:

> > When using Swing it's possible to generate a Deadlock.
> > It's related to the nested eventloop started in enterFullScreenExitingLoop - and \
> > the RenderLock aquired when using setView in Scene. Sample Programm and \
> > Threaddump are added to the ticket. 
> > Removing the nested loop fixes the Problem. 
> > I hope this doesn't have any side effect - so far i don't know of any.
> 
> Florian Kirmaier has updated the pull request incrementally with one additional \
> commit since the last revision: 
> JDK-8273485
> Fixing toggle fullscreen!

What version of macOS did you test on? I was running on 10.15.7 (Catalina). I just \
tried it on macOS 11.5 (Big Sur) and the exception does not happen, and on 10.14.6 \
(Mojave) where is does. To summarize, when calling `Platform.exit` while in \
full-screen mode:

macOS 10.14.6 : exception
macOS 10.15.7 : exception
macOS 11.5 : OK

modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m line 1345:

> 1343:         if (self->nativeFullScreenModeWindow)
> 1344:         {
> 1345:             [[self->nsView window] toggleFullScreen:self];

I see you added the call to `toggleFullScreen` back in, but you now pass `self` to \
the method, where the previous code passed `nil`. Unless there is a compelling reason \
why you need to change it, I recommend to restore _exactly_ the former code, such \
that there are no diffs:


            [self->nativeFullScreenModeWindow \
performSelector:@selector(toggleFullScreen:) withObject:nil];

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic