[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-openjfx-dev
Subject: Re: RFR: 8231558: [macos] Platform.exit causes assertion error on macOS 10.15 or later [v2]
From: Pankaj Bansal <pbansal () openjdk ! java ! net>
Date: 2021-06-28 12:45:06
Message-ID: QKghaIXNVO6DDwH9-KDVtx9CcyDa_34qfapnjmL6aF8=.0397bedc-ef0d-45d6-bc00-f294e4b38301 () github ! com
[Download RAW message or body]
On Mon, 28 Jun 2021 12:27:34 GMT, Kevin Rushforth <kcr@openjdk.org> wrote:
> > This is a fix for the assertion error message that is printed to the console on \
> > macOS 10.15 or later when an application calls `Platform.exit` while a `Stage` is \
> > showing.
> > The root cause is a latent bug in the JavaFX glass code that was revealed by an \
> > apparent change of behavior in macOS. A few of the object deallocation methods, \
> > which are called by the Objective C auto-release mechanism, use the standard \
> > `GET_MAIN_JENV` macro to get the JNI environment. The macro will print an \
> > assertion warning if Java has been detached. I instrumented the code and can see \
> > that `GlassViewDelegate::dealloc` is now called after the `GlassApplication` main \
> > loop has detached Java. Since we don't control when the dealloc method is called, \
> > it is not correct to do the assertion check in those cases. Some of the dealloc \
> > methods already skip this assertion check by grabbing the jEnv pointer directly, \
> > so we need to fix the others. I added a new variant of the macro called \
> > `GET_MAIN_JENV_NOWARN` with a comment indicating that is suitable for use by the \
> > dealloc methods.
> > In addition to verifying that the test program attached to JBS now exits cleanly \
> > with no assertion failure message, I added an automated system test that fails on \
> > macOS before the fix and passes after the fix. On other platforms it passes \
> > already.
>
> Kevin Rushforth has updated the pull request incrementally with one additional \
> commit since the last revision:
> Fix value of ERROR_TIMEOUT constant per code review
Looks good
-------------
Marked as reviewed by pbansal (Committer).
PR: https://git.openjdk.java.net/jfx/pull/540
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic