openjdk-8 has broken font configuration now that openjdk-7 has been removed

Bug #1243879 reported by Andrew McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro OpenEmbedded
Fix Released
Critical
Andrew McDermott

Bug Description

Since we dropped icedtea (openjdk-7) there is a run-time dependency missing for openjdk-8 on a font collection.

This bug is blocking OpenJDK-8 benchmarking.

Any access to fonts will raise the following exception:

java.lang.NullPointerException
        at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
        at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
        at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:753)
        at sun.font.SunFontManager$2.run(SunFontManager.java:430)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.SunFontManager.<init>(SunFontManager.java:375)
        at sun.awt.X11FontManager.<init>(X11FontManager.java:32)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:414)
        at java.lang.Class.newInstance(Class.java:433)
        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 sun.font.SunFontManager.getInstance(SunFontManager.java:249)
        at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
        at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:845)
        at org.jfree.text.G2TextMeasurer.getStringWidth(G2TextMeasurer.java:79)
        at org.jfree.text.TextUtilities.nextLineBreak(TextUtilities.java:285)
        at org.jfree.text.TextUtilities.createTextBlock(TextUtilities.java:226)
        at org.jfree.text.TextUtilities.createTextBlock(TextUtilities.java:197)
        at org.jfree.chart.title.TextTitle.arrangeRR(TextTitle.java:489)
        at org.jfree.chart.title.TextTitle.arrange(TextTitle.java:450)
        at org.jfree.chart.JFreeChart.drawTitle(JFreeChart.java:1261)
        at org.jfree.chart.JFreeChart.draw(JFreeChart.java:1151)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1349)
        at org.jfree.chart.JFreeChart.createBufferedImage(JFreeChart.java:1329)
        at org.jfree.chart.ChartUtilities.writeChartAsJPEG(ChartUtilities.java:414)
        at org.jfree.chart.ChartUtilities.saveChartAsJPEG(ChartUtilities.java:508)
        at org.jfree.chart.ChartUtilities.saveChartAsJPEG(ChartUtilities.java:460)
        at spec.reporter.Utils.generateMainChart(Utils.java:286)
        at spec.reporter.ReportGenerator.generateReport(ReportGenerator.java:396)
        at spec.reporter.ReportGenerator.main2(ReportGenerator.java:751)
        at spec.reporter.Reporter.main2(Reporter.java:51)
        at spec.harness.Launch.createReport(Launch.java:307)
        at spec.harness.Launch.runBenchmarkSuite(Launch.java:250)
        at spec.harness.Launch.main(Launch.java:452)

What's noticeable is that if you run fc-list(1) there are no fonts listed. After adding the liberation-fonts package then fc-list(1) will return some valid fonts.

It's not clear if this is actually the best fix but looking at the difference between packages that were present in 13.09 (which had icedtea, jamvm) and 13.10 the liberation-fonts package is now conspicuously missing from 13.10.

Changed in linaro-oe:
importance: Undecided → Critical
milestone: none → 13.10
Changed in linaro-oe:
assignee: nobody → Andrew McDermott (frobware)
Changed in linaro-oe:
status: New → Fix Committed
Revision history for this message
Andrew McDermott (frobware) wrote :

If you are running 13.10 the immediate fix is to add the following (and attached) package to your system:

 # opkg install liberation-fonts_1.04-r4_aarch64.ipk

Changed in linaro-oe:
milestone: 13.10 → 13.11
summary: openjdk-8 has broken font configuration now that openjdk-7 has been
- remove
+ removed
Fathi Boudra (fboudra)
Changed in linaro-oe:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.