New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting NULL pointer exception at sun.awt.FcFontManager.getDefaultPlatformFont(FcFontManager.java:76) #80
Comments
@madhu-broad - can you try the latest 8u242 release please? |
Related: AdoptOpenJDK/openjdk-jdk8u#6 and adoptium/temurin-build#693. Fixing #70 might fix this one, too. |
Tried with the latest build i.e. 8u242 but the result remains the same. |
Any milestone/tentative date for fix? This helps us for our planning. |
@madhu-broad Please watch #70. I plan to bring the topic up in this week's TSC call. We didn't get to it last week. Then maybe we have an idea what's to do and how long it might take. |
Closing because it's a duplicate of #70. |
@madhu-broad I just tested with 8u275 on Solaris 11.4/x64 and there's nothing to install. The following test program printed a bunch of fonts:
So, if you get some fonts, too, then the basic font integration works okay. The Emulex tool might be requesting a font that isn't installed, so looking into an old Oracle JDK for fonts and copying them over might work. I couldn't find a download for the Emulex tool, so I cannot test myself. If you want to test with OpenJDK 11, you can grab a download from BellSoft: https://bell-sw.com/pages/downloads/#/java-11-lts. If that works for you, great. For testing purposes, trying an Oracle JDK 8 from https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html shouldn't hurt, either. |
Closing due to lack of requested feedback. We're happy to reopen the issue if feedback is provided by the OP (or anybody else) at a later date. |
Platform and architecture (e.g. Linux/x64: Solaris Sparc 11.4/5 and x86 11.4/5
Java version (from "java --version") e.g. 1.8.0_181, 11.0.4+11 etc.: openjdk version "1.8.0_222"
Variant e.g. HotSpot or OpenJ9: hotspot
Have you tested it with other vendors' java: Oracle JRE works
Steps to reproduce:
Error messsage and/or description of what is not working as expected:
Hello,
We have a GUI application (based on java.swing), which is basically management application for enterprise servers runs on Linux and Solaris platforms. The application use to work with Oracle JDK-JRE and recently we tried with OpenJDK ((AdoptOpenJDK)(build 1.8.0_222-b10)) on Solaris platforms and the build integration went fine but while running the application it fails with 'NULL Pointer exception' at sun.awt.FcFontManager.getDefaultPlatformFont(FcFontManager.java:76) and the behaviour is the same on both Solaris x64 and Sparc servers (11.4/5 builds).
Copied below the issue for reference with the OpenJDK info..
root@dhcp-10-123-179-44:/opt/ocm# ./ocmanager
Exception in thread "main" java.lang.NullPointerException
at sun.awt.FcFontManager.getDefaultPlatformFont(FcFontManager.java:76)
at sun.font.SunFontManager$2.run(SunFontManager.java:433)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:376)
at sun.awt.FcFontManager.(FcFontManager.java:35)
at sun.awt.X11FontManager.(X11FontManager.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:491)
at java.awt.Font.getFamily(Font.java:1220)
at java.awt.Font.getFamily_NoClientCode(Font.java:1194)
at java.awt.Font.getFamily(Font.java:1186)
at sun.swing.SwingUtilities2.displayPropertiesToCSS(SwingUtilities2.java:1478)
at javax.swing.plaf.basic.BasicHTML$BasicDocument.setFontAndColor(BasicHTML.java:366)
at javax.swing.plaf.basic.BasicHTML$BasicDocument.(BasicHTML.java:355)
at javax.swing.plaf.basic.BasicHTML$BasicEditorKit.createDefaultDocument(BasicHTML.java:311)
at javax.swing.plaf.basic.BasicHTML.createHTMLView(BasicHTML.java:54)
at javax.swing.plaf.basic.BasicHTML.updateRenderer(BasicHTML.java:207)
at javax.swing.plaf.basic.BasicLabelUI.propertyChange(BasicLabelUI.java:481)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
at java.awt.Component.firePropertyChange(Component.java:8434)
at javax.swing.JLabel.setText(JLabel.java:330)
at AboutOCM.initComponents(AboutOCM.java:253)
at AboutOCM.(AboutOCM.java:37)
at AboutOCM.(AboutOCM.java:26)
at HBAnyware.(HBAnyware.java:387)
at HBAnyware.run(HBAnyware.java:14244)
at EmulexHBAManager.main(EmulexHBAManager.java:14)
root@dhcp-10-123-179-44:/opt/ocm#
root@dhcp-10-123-179-44:/opt/ocm# ./jre/bin/java -version
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)
root@dhcp-10-123-179-44:/opt/ocm#
root@dhcp-10-123-179-44:/tmp# uname -a
SunOS dhcp-10-123-179-44 5.11 11.4.12.5.0 i86pc i386 i86pc
root@dhcp-10-123-179-44:/tmp#
Couple of options we tried, i.e. Verified the existence of library 'libfontconfig' and it exist. Copied below the output reference.
root@dhcp-10-123-179-44:
# find /usr/lib -name font.*#/usr/lib/libfontconfig.so
/usr/lib/libfontconfig.so.1.9.2
/usr/lib/amd64/libfontconfig.so
/usr/lib/amd64/libfontconfig.so.1.9.2
/usr/lib/amd64/pkgconfig/fontconfig.pc
/usr/lib/amd64/pkgconfig/fontenc.pc
/usr/lib/amd64/libfontconfig.so.1
/usr/lib/libfontconfig.so.1
/usr/lib/tk8.6/fontchooser.tcl
/usr/lib/tk8.6/ttk/fonts.tcl
/usr/lib/tk8.6/demos/fontchoose.tcl
/usr/lib/pkgconfig/fontconfig.pc
/usr/lib/pkgconfig/fontenc.pc
/usr/lib/xorg/amd64/libfontenc.so.1
/usr/lib/xorg/amd64/libfontenc.so
/usr/lib/xorg/amd64/libfontenc.so.1.0.0
/usr/lib/xorg/libfontenc.so.1
/usr/lib/xorg/libfontenc.so.1.0.0
/usr/lib/xorg/libfontenc.so
/usr/lib/grub2/uefi64/lib/grub/x86_64-efi/font.mod
/usr/lib/grub2/bios/lib/grub/i386-pc/font.mod
root@dhcp-10-123-179-44:
Please note that the application still works from Oracle JDK-JRE on Solaris platforms.
After going through a few links on the net, have a couple of questions.
We are a kind of stuck at the starting itself, Highly appreciate the help..
Thanks,
Madhu
The text was updated successfully, but these errors were encountered: