[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] RFR: 8167103: Intermittent font loading failure on macOS with JFXPanel applicat
From: Philip Race <philip.race () oracle ! com>
Date: 2016-11-26 23:30:43
Message-ID: 583A1B23.8070203 () oracle ! com
[Download RAW message or body]
It is just for debugging so not that important and
in any case at one point when I tried this using
the URL for the file not the folder "res" was set up
CFErrorRef was left as nil so it didn't get filled in any way ..
-phil.
On 11/24/16, 12:50 AM, Prasanta Sadhukhan wrote:
>
> Seems fine to me. Only thing is since "res" is being printed, it
> suggests you are interested in knowing the return status of
> CTFontManagerRegisterFontsForURL method
>
> in which case, I think it will be better if we pass |CFErrorRef
> parameter instead of nil and print that out [maybe
> via||CFErrorCopyDescription(_ err: CFError!)]||, so that we can know
> the reason for failure better.
>
> Regards
> Prasanta
> >
> On 11/22/2016 8:15 AM, 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 ..
> >
> > > 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.
> >
> > -phil.
> >
> > >
> > > 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.
> > >
> > >
>
[Attachment #3 (text/html)]
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It is just for debugging so not that important and<br>
in any case at one point when I tried this using<br>
the URL for the file not the folder "res" was set up<br>
CFErrorRef was left as nil so it didn't get filled in any way ..<br>
<br>
-phil.<br>
<br>
On 11/24/16, 12:50 AM, Prasanta Sadhukhan wrote:
<blockquote
cite="mid:ee296705-764c-9217-1bd7-611e2db12f8c@oracle.com"
type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<p>Seems fine to me. Only thing is since "res" is being printed,
it suggests you are interested in knowing the return status of <span
class="changed">CTFontManagerRegisterFontsForURL method<br>
</span></p>
in which case, I think it will be better if we pass <code>CFErrorRef
parameter instead of nil and print that out [maybe via</code><code><span
class="syntax-identifier"> CFErrorCopyDescription</span>(<span
class="syntax-identifier">_</span> <span
class="syntax-param-name">err</span>: <span
class="syntax-type">CFError</span>!)]</code><code>, so that we
can know the reason for failure better.<br>
<br>
Regards<br>
Prasanta<br>
</code>
<div class="moz-cite-prefix">On 11/22/2016 8:15 AM, Philip Race
wrote:<br>
</div>
<blockquote cite="mid:5833B135.9070701@oracle.com" type="cite"> <br>
<br>
On 11/21/16, 4:17 PM, Sergey Bylokhov wrote: <br>
<blockquote type="cite">Looks fine, but are you sure that we
need such mix of logging in the debug build? <br>
</blockquote>
<br>
Do you mean "any" logging or the mix in of the printf ? <br>
Certainly the ifdef DEBUG pattern is used all over this file ..
<br>
<br>
<blockquote type="cite"> 410 #ifdef DEBUG <br>
411 NSLog(@"path is : %@", (NSString*)path); <br>
412 NSLog(@"url is : %@", (NSString*)url); <br>
413 printf("res is %d\n", res); <br>
414 #endif <br>
<br>
I wonder from the specification of the old method which was
used: <br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://developer.apple.com/reference/applicationservices/1563693-atsfontactivat \
efromfilereference?language=objc">https://developer.apple.com/reference/applicationservices/1563693-atsfontactivatefromfilereference?language=objc</a>
<br>
</blockquote>
<br>
Not sure exactly what you mean there but if you mean that the <br>
Apple docs seem to have "deleted" the specification, yes, and <br>
that was one reason to upgrade .. I didn't even know what <br>
the limitations were on the old method. <br>
<br>
-phil. <br>
<br>
<blockquote type="cite"> <br>
On 22.11.16 1:34, Philip Race wrote: <br>
<blockquote type="cite">Bug: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8167103">https://bugs.openjdk.java.net/browse/JDK-8167103</a>
<br>
Webrev: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Eprr/8167103/">http://cr.openjdk.java.net/~prr/8167103/</a>
<br>
<br>
This bug is a deadlock in MacOS platform font code when <br>
JavaFX and Java2D are both calling platform font APIs. <br>
This can happen in the context of Swing inter-op for FX. <br>
It was previously seen when embedding Swing in FX
(SwingNode) <br>
in bug <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8120878">https://bugs.openjdk.java.net/browse/JDK-8120878</a>
<br>
There was a workaround added for that case. <br>
Now it is seen when loading embedding FX in Swing (JFXPanel)
<br>
What seems to work is switching 2D from using the deprecated
<br>
ATS API to the same CoreText API used by FX. <br>
<br>
The bug was reported against FX but since the fix is in 2D
I've <br>
recategorised it. <br>
<br>
-phil. <br>
</blockquote>
<br>
<br>
</blockquote>
</blockquote>
<br>
</blockquote>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic