[OpenJDK 2D-Dev] RFR: 8167103: Intermittent font loading failure on macOS with JFXPanel application

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Nov 22 00:17:08 UTC 2016


Looks fine, but are you sure that we need such mix of logging in the 
debug build?
  410 #ifdef DEBUG
  411     NSLog(@"path is : %@", (NSString*)path);
  412     NSLog(@"url is : %@", (NSString*)url);
  413     printf("res is %d\n", res);
  414 #endif

I wonder from the specification of the old method which was used:
https://developer.apple.com/reference/applicationservices/1563693-atsfontactivatefromfilereference?language=objc

On 22.11.16 1:34, Philip Race wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8167103
> Webrev: http://cr.openjdk.java.net/~prr/8167103/
>
> This bug is a deadlock in MacOS platform font code when
> JavaFX and Java2D are both calling platform font APIs.
> This can happen in the context of Swing inter-op for FX.
> It was previously seen when embedding Swing in FX (SwingNode)
> in bug https://bugs.openjdk.java.net/browse/JDK-8120878
> There was a workaround added for that case.
> Now it is seen when loading embedding FX in Swing (JFXPanel)
> What seems to work is switching 2D from using the deprecated
> ATS API to the same CoreText API used by FX.
>
> The bug was reported against FX but since the fix is in 2D I've
> recategorised it.
>
> -phil.


-- 
Best regards, Sergey.



More information about the 2d-dev mailing list