1

I have a swing application and inside i added a JFXpanel from javafx2 jdk1.7_17 (also tried 1.7_15). i do create the JFXpanel in EDT and add it on swing tabbed pane, then add the scene to the FXPanel in javaFX thread as shown in the doc. If i run the application once everything is fine, if i stop the application and run it again the jvm crashes saying Problematic Frame libdbus. After closing the application no matter how many times i try the jvm will crash complaining about dbus usually but not always:

JRE version: 7.0_17-b02
Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode linux-amd64 compressed oops)
Problematic frame:
C  [libc.so.6+0x12fbd6]Java Result: 134

Sometimes i get this:

 GConf-WARNING **: Got Disconnected from DBus.

If i restart the pc it runs ok the first time again and then if i close / re-run it keeps crashing at start up. I am running fedora 18 and i believe it maybe OS related since java FX is using native libs.

FXPanelJob fxPanelJob = new FXPanelJob(fxPanel);
tabbedPane = new JTabbedPane();
tabbedPane.addTab("table", fxPanel);
Platform.runLater(fxPanelJob);

private class FXPanelJob implements Runnable {

    private JFXPanel fxPanel;
    private volatile boolean done = false;

    public FXPanelJob(JFXPanel fxPanel) {
        this.fxPanel = fxPanel;
    }

    @Override
    public void run() {
        initFX(fxPanel);
        done = true;
    }

    private void initFX(JFXPanel fxPanel) {
        // This method is invoked on the JavaFX thread
        VBox vbox = new VBox();
        Scene scene = new Scene(vbox, 300, 200);
        TableView<ReportRaw> table = new Table();
        vbox.getChildren().addAll(table);
        VBox.setVgrow(table, Priority.ALWAYS);
        fxPanel.setScene(scene);
    }
}

Since the first time is running i just guessed that might be a problem with shutting down the javafx on application exit. On windowClosing event i have:

Platform.runLater(new Runnable(){ public void run(){
         Platform.exit();
});

Update:

It turns out its not a java fx problem, i switched to JDK 6 and everything is fine. I think it is specific to OS problem. Using jdk 7 without java fx could still trigger jvm crash.

if anyone knows what might be causing the jvm to crash i would appreciate. Thank you in advance

Update 2

found a similar post, it seems to have been solved but i am not sure: http://ubuntuforums.org/showthread.php?t=1697231&page=3 use this for jvm arguement -XX:-UseCompressedOops. i'll post it as an answer when i make sure its not crashing anymore.

Update 3

Couldn't solve it i commented out my javafx code as a solution. I believe its EDT related but i cant guarantee. it seems to be occuring several lines after the JavaFx panel is added on swing app. Not always at the same line. If removed everything works, so i guess its still an immature project.

5
  • Could you please file a bug on javafx-jira.kenai.com or bugs.sun.com for this issue?
    – Petr
    Mar 27, 2013 at 13:02
  • Will do tonight, sorry for the delay. I'll post the link back here as well in case anyone needs it. Thank you. Apr 9, 2013 at 8:57
  • started a bug in jira as requested. Thank you for the -1. Have fun. javafx-jira.kenai.com/browse/JMY-216 Apr 9, 2013 at 14:43
  • can you add crash log?
    – Kowser
    Jul 18, 2013 at 11:37
  • I used to have a crash log saved but unfortunately none replied here or in jira so i deleted all my javaFX code and decided its unstable and i wont use it. I should be able to reproduce it if i go back in the repository but i guess it will be a waste of my time at work. It seemed to be random it would crash after adding the java fx panel on a swing app. Jul 18, 2013 at 15:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.