Eclipse is working fine inside the container and its window is visible on the host (with the X11 being shared through socket).
The app is an Eclipse RCP project using JavaFX (Efxclipse and M2Eclipse). I removed all the references for the RCP below to have less complexity in the example and because it happens with really simple JavaFX apps (non-OSGI) as well - so OSGI isn't the issuer.
The following fatal error is happening when running a JavaFX GUI app inside Eclipse (inside a Docker container).
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f56bb14dd20, pid=233, tid=0x00007f567cea1700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.111-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [ld-linux-x86-64.so.2+0x9d20]
#
# Core dump written. Default location: /home/docker/test/JavaFX/login/core or core.233
#
# An error report file with more information is saved as:
# /home/docker/test/JavaFX/login/hs_err_pid233.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
The full log can be found here.
Host details:
- Ubuntu 16.10
- Docker version 1.12.3, build 6b644ec
Container details:
- Ubuntu 16.04
- Oracle JDK 1.8.0_111 64bits
- Eclipse Luna (RCP 4.4.2) with e(fx)clipse 1.2.0.201501301049
- Dockerfile
Code for the JavaFX app:
package application;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) {
try {
Scene scene = new Scene(new BorderPane(),400,400);
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
Although I had success running a simple GUI app using Swing:
package application; import javax.swing.JFrame; import javax.swing.JLabel; public class Test { private static void createAndShowGUI() { JFrame frame = new JFrame("Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500, 500); JLabel label = new JLabel("Test"); frame.getContentPane().add(label); frame.setVisible(true); } public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } }
and this lead us to some problem related to JavaFX.
Even running an exported JavaFX app (as a Jar file) on the console (outside Eclipse) it's returning the same error.
Ideas on how to solve it and have the JavaFX app running inside Eclipse in the container?
Thanks