Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8089584

[SWT,Linux] FXCanvas will hang or crash on startup with swt-4.4 on Linux

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 9
    • 8u20, 9
    • javafx
    • None

      Running a simple "HelloFXCanvas" program with swt4.4 on Linux will either hang (on OEL 7) or crash (on Ubuntu 14.04) on startup when libglass.so is loaded and initialized.

      To reproduce this crash, compile and run the attached test program as follows:

      1. Download the swt-4.4 bundle from:
      http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.4-201406061215/swt-4.4-gtk-linux-x86_64.zip


      2. Create a 'swt-4.4' directory, and unzip the bundle into that directory.


      3. Compile the attached test program as follows:

      A) Using a JDK with FX included:
      javac -cp .:$JAVA_HOME/jre/lib/jfxswt.jar:$DOWNLOAD_DIR/swt-4.4/swt-debug.jar SimpleFXCanvas.java

      -OR-

      B) Using your own FX build and a JDK with jfxrt.jar removed:
      javac -Xbootclasspath/a:$JAVAFX_HOME/rt/lib/ext/jfxrt.jar -cp .:$JAVAFX_HOME/rt/lib/jfxswt.jar:$DOWNLOAD_DIR/swt-4.4/swt-debug.jar SimpleFXCanvas.java


      4. Run the test program as follows:

      A) Using a JDK with FX included:
      java -cp .:$JAVA_HOME/jre/lib/jfxswt.jar:$DOWNLOAD_DIR/swt-4.4/swt-debug.jar SimpleFXCanvas

      -OR-

      B) Using your own FX build and a JDK with jfxrt.jar removed:
      java -Xbootclasspath/a:$JAVAFX_HOME/rt/lib/ext/jfxrt.jar -cp .:$JAVAFX_HOME/rt/lib/jfxswt.jar:$DOWNLOAD_DIR/swt-4.4/swt-debug.jar SimpleFXCanvas


      BUG: The application will either hang or crash when libglass.so is loaded and initialized via System.load("libglass.so").

      On Ubuntu 14.04 the JRE will crash. See the attached hs_err log.
      On OEL 7 the JRE will hang. See the attached thread stack dump.

        1. hs_err_pid18906.log
          84 kB
          Kevin Rushforth
        2. SimpleFXCanvas.java
          2 kB
          Kevin Rushforth
        3. threaddump.txt
          5 kB
          Kevin Rushforth

            ssadetsky Semyon Sadetsky (Inactive)
            kcr Kevin Rushforth
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: