[OpenJDK 2D-Dev] RFR: 8221741 ClassCastException happen when fontconfig.properties was used
philip.race at oracle.com
Tue Oct 8 16:06:16 UTC 2019
I think this needs a little bit more explanation first.
Systems without fontconfig ... meaning without libfontconfig.
So does that mean you just can't find fonts or have none installed ?
If you have fonts installed and have a custom fontconfig.properties file
which references those, then you should be able to get a default font
set of known existent physical fonts.
If you have neither .. then you have a system configuration problem and
a physical font installed avoiding an exception here isn't really going
to help you
get much further. Perhaps we should throw InternalError a bit earlier.
I see no point in trying to survive ..
On 10/8/19, 12:35 AM, Langer, Christoph wrote:
> Hi Ichiroh,
> thanks for the update. It looks good to me. I'll run it through test system tonight and let you know if we see issues by tomorrow. Should you not hear back from me, consider it as reviewed and tested
>> -----Original Message-----
>> From: Ichiroh Takiguchi<takiguc at linux.vnet.ibm.com>
>> Sent: Montag, 7. Oktober 2019 19:16
>> To: Langer, Christoph<christoph.langer at sap.com>
>> Cc: 2d-dev at openjdk.java.net; Zeller, Arno<arno.zeller at sap.com>
>> Subject: RE: [OpenJDK 2D-Dev] RFR: 8221741 ClassCastException happen
>> when fontconfig.properties was used
>> Hello Christoph.
>> I appreciate your suggestion.
>> JTreg testcase could throw ClassCastException instead of
>> JTreg results were in JDK-8221741
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8221741
>> Change: https://cr.openjdk.java.net/~itakiguchi/8221741/webrev.05/
>> Could you review the fix ?
>> Ichiroh Takiguchi
>> IBM Japan, Ltd.
>> On 2019-10-07 22:53, Langer, Christoph wrote:
>>> Hi Ichiroh,
>>> this is great, thanks for doing this. We regularly see this and just
>>> stumbled over it the other day where the fontconfig of our test user
>>> was corrupted somehow.
>>> As for the test, I would reduce the amount of reflection a little bit.
>>> It should not be necessary to access SunFontManager via Class.forName,
>>> you already exported it to the test via the @modules statement. You
>>> can probably use this coding (please try as I didn't test it):
>>> SunFontManager sfm = SunFontManager.getInstance();
>>> Field defaultFontName_fid =
>>> defaultFontName_fid.set(sfm, "Dialog");
>>> Method loadFonts_mid =
>>> PhysicalFont physicalFont = sfm.getDefaultPhysicalFont();
>>> If you want, I can run your (updated) patch through our test system.
>>>> -----Original Message-----
>>>> From: 2d-dev<2d-dev-bounces at openjdk.java.net> On Behalf Of Ichiroh
>>>> Sent: Montag, 7. Oktober 2019 09:33
>>>> To: 2d-dev at openjdk.java.net
>>>> Subject: [OpenJDK 2D-Dev] RFR: 8221741 ClassCastException happen
>>>> fontconfig.properties was used
>>>> Could you review the fix ?
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8221741
>>>> Change: https://cr.openjdk.java.net/~itakiguchi/8221741/webrev.04/
>>>> JTreg testcase and results are including JDK-8221741 .
>>>>  https://bugs.openjdk.java.net/browse/JDK-8221741
>>>> Ichiroh Takiguchi
>>>> IBM Japan, Ltd.
More information about the 2d-dev