Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

FontAwesomeFX 9.1.2 hangs GluonVM on iOS #30

Open
odbuser2 opened this issue Feb 21, 2018 · 5 comments
Open

FontAwesomeFX 9.1.2 hangs GluonVM on iOS #30

odbuser2 opened this issue Feb 21, 2018 · 5 comments

Comments

@odbuser2
Copy link

org.javafxports:jfxmobile-plugin:2.0.8
FontAwesomeFX : 9.1.2
Platform : iOS (at least)

Description
FontAwesome hangs Gluon apps in iOS without any exception thrown.

To Reproduce
Take any working test project, add the following dependencies to build.gradle
The jars are in bintray (jcenter)

    compile 'de.jensd:fontawesomefx-commons:9.1.2'
    compile 'de.jensd:fontawesomefx-controls:9.1.2'
    compile 'de.jensd:fontawesomefx-emojione:3.1.1-9.1.2'
    compile 'de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2'
    compile 'de.jensd:fontawesomefx-icons525:4.2.0-9.1.2'
    compile 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2'
    compile 'de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2'
    compile 'de.jensd:fontawesomefx-materialstackicons:2.1-5-9.1.2'
    compile 'de.jensd:fontawesomefx-octicons:4.3.0-9.1.2'
    compile 'de.jensd:fontawesomefx-weathericons:2.0.10-9.1.2'

Add the following code:

try {
    System.out.println("Before");
    new FontAwesomeIconView(FontAwesomeIcon.SIGN_OUT);
} catch(Throwable t) {
    t.printStackTrace();
}
System.out.println("After");

The application will hang

@odbuser2
Copy link
Author

odbuser2 commented Mar 1, 2018

org.javafxports:jfxmobile-plugin:2.0.12

Same behavior. No exception or log message, just a hang. Can you take a look? Fontawesomefx is a very necessary library to use on Mobile.

@odbuser2
Copy link
Author

Workaround
Depend on de.jensd:fontawesomefx-commons:9.1.2 but embed de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2 without the module-info.java file.

I haven't tracked down why this is the case. It does NOT work if you recompile de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2 as a jar and depend on it - only if you embed the java and resources in the project...

@tiainen
Copy link
Contributor

tiainen commented Mar 17, 2018

There was an issue that resource files from jar dependencies weren't included in the iOS app. That should be fixed now, so could you try again with the latest version 2.0.16?

@odbuser2
Copy link
Author

Fixed. Closing. Thank you!

@odbuser2
Copy link
Author

odbuser2 commented Mar 29, 2018

org.javafxports:jfxmobile-plugin:2.0.18

More was required to make this work for Desktop, iOS, and Android when adding in other jars like material. Basically, you need the following:

  • compile using compileOnly so that they aren't present at runtime (b/c one set of libraries will work on 9 but no 8)
  • recompile version 9 jars using the java 9 compiler but targeting 1.8 (do not use modules)
  • remove the license directory from the jars due to a conflict in build process (gvm directory conflict)
  • specify version 9 jars in the runtime config for Desktop and version 9 targeting 8 with no license dir for iOS and version 8 with no license dir for Android

    compileOnly(   'de.jensd:fontawesomefx-commons:9.1.2-9-target-8')            {transitive=false}
    compileOnly(   'de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2-9-target-8')  {transitive=false}
    compileOnly(   'de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2-9-target-8-nolicense'){transitive=false}

    desktopRuntime('de.jensd:fontawesomefx-commons:9.1.2')              {transitive=false}
    desktopRuntime('de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2')    {transitive=false}
    desktopRuntime('de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2')  {transitive=false}
    
    iosRuntime(    'de.jensd:fontawesomefx-commons:9.1.2-9-target-8')            {transitive=false}
    iosRuntime(    'de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2-9-target-8')  {transitive=false}
    iosRuntime(    'de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2-9-target-8-nolicense'){transitive=false}

    androidRuntime('de.jensd:fontawesomefx-commons:8.15')                    {transitive=false}
    androidRuntime('de.jensd:fontawesomefx-fontawesome:4.7.0-5')             {transitive=false}
    androidRuntime('de.jensd:fontawesomefx-materialicons:2.2.0-5-nolicense') {transitive=false}

Using {platform}Compile instead of compileOnly and {platform}Runtime does not work... I think that's an issue that I'll open a separate issue.

Also, I think there's an issue using Java 9 module jars even if they target Java 1.8 and I'll open an issue for that when I come across it again.

@odbuser2 odbuser2 reopened this Mar 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants