FontawesomeFX Icons displayed as garbage with latest 32-Bit Java JDK

Issue #40 wontfix
Former user created an issue

Dear Jens,

today I tried out running my JavaFX based app with the latest

jdk 1.8.0_101 (32-Bit) 

on Linux Mint 18 (64-Bit) and on Xubuntu 14.04 (32-Bit). But somehow ALL the fontawesomeFX icons couldn't be displayed properly on both 32-Bit and 64-Bit Linux systems running with 32-Bit JDK. As soon as I switch back to the 64-Bit JDK on the 64-Bit Linux system, everything went back to normal and all icons are beautifully presented. Could you please be kind enough to look into this issue?

Thank you so much for your efforts, Jens!

Cheng

p.s: I have included in attachements both working and faulty icons.

Comments (19)

  1. Andrea Vacondio

    I tested the Glyph browser in a brand new Ubuntu 32bits box with the latest jdk-8u122-ea and it seems this is a consistent and reproduceable issue. fontawesomefx32.png

  2. Andrea Vacondio

    That's weird indeed.. is there anything I can do to help figure out this? Like enabling some logging, run some test..

  3. Andrea Vacondio

    I'm trying to figure this out. The issue seems to be that this call returns null

    Font.loadFont(stream, 10.0d)
    

    This happens in both FontAwesomeIconView and GlyphsFactory so running the FontAwesomeIconsDemoApp it calls both (BTW is this correct? Load the font twice?) and both times the Font::loadFont returns null and according to the javadoc "Any failure such as abbreviated input, or an unsupported font format will result in a null return. It is the application's responsibility to check this before use." So I guess the issue is to find out why it returns null and probably a second issue is that Fontawesomefx should somehow handle it or at least signal that something went wrong. I'll try to debug and find out what is going on.

  4. medmedin2014

    I tested the latest Glyphs Brower v1.1.1 (note: the downloaded file has no .jar extension and the title bar has the old version 1.1.0) on Ubuntu Mate 16.04.1 - 32bits with OpenJDK 1.8.0_111, and i get the same behavior as before Screenshot at 2017-01-24 22-47-56.png

  5. medmedin2014

    The same here, I tested it with Oracle JRE 1.8.0_121 on Ubuntu Mate 16.04.1 - 32bits and I get the same problem as before. Note: I tested it also on Windows 10 - 32bits with Oracle JRE 1.8.0_102 and it works perfectly.

  6. Andrea Vacondio

    It seems it's a Java issue in the end. I created a simple snippet

    public class App extends Application {
    
        private static final String FONT = "/home/torakiki/test/fontawesome-webfont.ttf";
        public static void main(String[] args) {
            Application.launch(App.class, args);
        }
    
        @Override
        public void start(Stage primaryStage) throws Exception {
             Font font = Font.loadFont(Files.newInputStream(Paths.get(FONT)), 10.0d);
             System.out.println(font);
        }
    }
    

    It returns a Font in my Ubuntu64 and null in my Ubuntu32 box so I guess it doesn't have to do with FontAwesomeFX and it needs to be submitted to the Java bug tracker

  7. Andrea Vacondio

    I reported the issue to the Java bug track.. I'll let you know if I get any answer. Thanks for FontawesomeFX, I use it in PDFsam and it's very nice

  8. Log in to comment