[OpenJDK 2D-Dev] RFR: 8167103: Intermittent font loading failure on macOS with JFXPanel application
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Tue Nov 22 02:57:12 UTC 2016
On 22.11.16 5:45, Philip Race wrote:
>
>
> On 11/21/16, 4:17 PM, Sergey Bylokhov wrote:
>> Looks fine, but are you sure that we need such mix of logging in the
>> debug build?
>
> Do you mean "any" logging or the mix in of the printf ?
> Certainly the ifdef DEBUG pattern is used all over this file ..
I mean mix of printf and NSLog. It is not a problem but looks inconsistent.
>
>> 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
>>
>
> Not sure exactly what you mean there but if you mean that the
> Apple docs seem to have "deleted" the specification, yes, and
> that was one reason to upgrade .. I didn't even know what
> the limitations were on the old method.
Yep, the method which does not have the spec should not be used.
>> 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