0

Every time I try to debug a javaFx application I receive this error OpenJDK platform binary has stopped working. Which is the problem? The position of breakpoints are bad or there are many parts of the code, e.g. event handler, that can't be debugged?

EDIT:

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

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

    login();

}

public void login() {
    
    Stage stage = new Stage();
    stage.setTitle("Google");
    
    WebView root = new WebView();
    WebEngine engine = root.getEngine();
    
    engine.load("https://www.google.com");
    
    engine.setOnStatusChanged(new EventHandler<WebEvent<String>>() {
        public void handle(WebEvent<String> event) {
            
            System.out.println("here");
            
        }
    });
    
    Scene scene = new Scene(root);
    stage.setScene(scene);
    stage.show();
    
}

The stage that appears is totally white and doesn't work. When the exit button of windows is clicked appear the error OpenJDK platform binary has stopped working

Simone
  • 425
  • 1
  • 6
  • 17
  • If you mean your JavaFX application claims it has "stopped working", then that is to be expected when the _JavaFX Application Thread_ is suspended at a breakpoint (or indirectly suspended by a breakpoint configured to suspend all threads when one reaches it). As you step through the code things will update. If you resume execution things should return to normal. – Slaw Jan 05 '21 at 10:21
  • If I continue to skip breakpoints, at the end of the code I receive this error: An internal error occurred during: "Debug child count update". java.lang.IllegalStateException. And my stage appears completely white. – Simone Jan 05 '21 at 10:42
  • Interesting. I suppose there could be a problem caused by suspending threads used by JavaFX, but I don't remember ever encountering such a problem myself. Though I've always used IntelliJ over Eclipse. Is it possible to provide a [mre]? – Slaw Jan 05 '21 at 13:19

1 Answers1

1

Had the same problem. Deleting all breakpoints helped (Run/Remove all breakpoints), cmp Running a program in Debug mode is incredible slow