RFR: 8368882: NPE during text drawing on machine with JP locale [v5]
Phil Race
prr at openjdk.org
Tue Oct 21 18:17:07 UTC 2025
On Mon, 20 Oct 2025 05:58:25 GMT, Sergey Nazarkin <snazarki at openjdk.org> wrote:
>> There is a reproducible bug in symbol rendering on Windows machines with [particular](https://github.com/openjdk/jdk/blob/9d71af108ea2cc3682607527246d60a19fd820ba/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsEnv.cpp#L244) default locales. This changeset fixes the deferred font initialisation request, which now skips the last font in the list.
>>
>> The test (attached to the jira) was performed on a Windows 11 machine with the Japanese locale set as the default. Without the fix, it fails with an NPE. With the fix it displays a window showing glyphs drawn by all the fonts accessible from the Java application.
>
> Sergey Nazarkin has updated the pull request incrementally with one additional commit since the last revision:
>
> Get rid of eudc.reg
Please update that one word in the comment - last -> first
BTW the above doesn't invalidate this fix.
I think its is clear that the intent was to skip deferring the already initialized eudcFont but it got the slot wrong.
I see what happened. The eudc font was moved in this fix
https://bugs.openjdk.java.net/browse/JDK-8170913
but the slot that was assumed to be already initialized wasn't changed.
And I notice that this comment on the method.
* If so add it as the final fallback component of the composite.
Should be revised to
* If so add it as the first fallback component of the composite.
-------------
Marked as reviewed by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27551#pullrequestreview-3362097972
PR Comment: https://git.openjdk.org/jdk/pull/27551#issuecomment-3428544888
More information about the client-libs-dev
mailing list