JCEF with JavaFX fatal error

Having problems with building or using the JCEF Java binding? Ask your questions here.

JCEF with JavaFX fatal error

Postby abzakaria » Mon Nov 07, 2016 6:55 am

I'm trying to make JCEF to work in a swingNode in a simple JavaFX Application
Code: Select all
public class MainApp extends Application {

    @Override
    public void start(Stage stage) throws Exception {

        SwingNode swingNode = new SwingNode();

        SwingUtilities.invokeAndWait(() -> {
            String startURL = "https://www.google.com/";
            boolean useOSR = OS.isLinux();
            boolean isTransparent = false;

            CefSettings settings = new CefSettings();
            settings.windowless_rendering_enabled = useOSR;

            CefApp cefApp_ = CefApp.getInstance(settings);
            CefClient client_ = cefApp_.createClient();
            CefBrowser browser_ = client_.createBrowser(startURL, useOSR, isTransparent);
            Component browerUI_ = browser_.getUIComponent();

            JPanel panel = new JPanel();
            panel.setSize(800, 600);
            panel.add(browerUI_, BorderLayout.CENTER);

            swingNode.setContent(panel);
        });

        stage.setScene(new Scene(new javafx.scene.Group(swingNode)));
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }

I'm getting a fatal error at
Code: Select all
client_.createBrowser(startURL, useOSR, isTransparent);

digging into the jcef java code, the fatal error happens at CefBrowserOsr.java line 134
Code: Select all
private void createGLCanvas() {
    GLProfile glprofile = GLProfile.getMaxFixedFunc(true); // here


initialize on Thread[AWT-EventQueue-0,6,main] with library path /path/to/jcef/lib/linux64
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f3d07fced50, pid=22843, tid=0x00007f3ca5991700
#
# 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+0x9d50]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /path/to/jcef-javafx-maven/hs_err_pid22843.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#

however, the provided JCEF awt test examples runs perfectly.
JCEF Version = 3.2840.147
CEF Version = 3.2840.1511
Chromium Version = 54.0.2840.59
Oracle JDK version = 1.8.0_111

error log hs_err_pid.log content here http://pastebin.com/0Qpikyk0
abzakaria
Newbie
 
Posts: 2
Joined: Mon Nov 07, 2016 6:44 am

Re: JCEF with JavaFX fatal error

Postby magreenblatt » Mon Nov 07, 2016 11:30 am

magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: JCEF with JavaFX fatal error

Postby abzakaria » Tue Nov 08, 2016 7:19 am

what are the plans to support JCEF as a JavaFX node?
ps: I have upgraded to JOGL 2.3.2 and no jvm crash happens, but that wouldn't make it run in a JFX SwingNode anyway. I thought it's worth mentioning
abzakaria
Newbie
 
Posts: 2
Joined: Mon Nov 07, 2016 6:44 am

Re: JCEF with JavaFX fatal error

Postby magreenblatt » Tue Nov 08, 2016 10:44 am

abzakaria wrote:what are the plans to support JCEF as a JavaFX node?

There are no plans to support it currently. External contributions are welcome.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 18 guests