RFR: 8368882: NPE during text drawing on machine with JP locale [v5]

Prasanta Sadhukhan psadhukhan at openjdk.org
Fri Oct 24 09:25:08 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

test/jdk/java/awt/8368882/FallbackFontNPE.sh line 96:

> 94: 
> 95: exit 0
> 96: 

I am getting this in our CI run although test passed


----------System.out:(12/291)*----------
Setup EUDC.tte font
...Write HKCU\\EUDC\\1252 record
The operation completed successfully.

...Copy custom EUDC.tte file
Setup fallback font
Run java test FallbackFontNPE
Delete fallback font
Restore registry record
The operation completed successfully.

...Delete test EUDC.tte
----------System.err:(3/228)----------
ERROR: The system was unable to find the specified registry key or value.
cp: cannot create regular file 'C:/WINDOWS/Fonts/EUDC.tte': Permission denied
rm: cannot remove 'C:/WINDOWS/Fonts/EUDC.tte': No such file or directory

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27551#discussion_r2459478768


More information about the client-libs-dev mailing list