RFR: 8235627: Blank stages when running JavaFX app in a macOS virtual machine

Kevin Rushforth kcr at openjdk.java.net
Fri Dec 20 14:01:55 UTC 2019


On Fri, 20 Dec 2019 13:53:38 GMT, Frederic Thevenet <github.com+7450507+fthevenet at openjdk.org> wrote:

>> Actually, the existing check uses `err == kCGLNoError` which seems backwards (and likely is a big part of why this bug is happening). My recommendation is to not add in the check for `err != kCGLNoError`, and just use `if (pix == NULL)`.
>> 
>> The suggestion to add the print statement is a good one.
> 
> Actually, `err == kCGLNoError` was used before and not `err != kCGLNoError`  (i.e. equals and not different) and that is in fact the reason for the bug (in conjunction with the AND).
> As you note, it's unfortunate that the link you mentioned is no longer valid as it would be very useful to understand the motivation behind the original fix in JDK-8154148, because it is indeed quite puzzling.
> 
> Please note that in any case a check on `err != kCGLNoError` is done just before the function returns and the error is logged if true.

OK, so we're in agreement on the fix itself. Good.

The existing logging done right before the function returns will indeed log a complete failure to find a valid pixel format. It won't, however, log the fact that the initial attempt failed and we then try to use a fallback. It was this that @arapte asked to be logged. I agree with his request.

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

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


More information about the openjfx-dev mailing list