Eclipse locking Linux Mint Cinnamon desktop when debugging Java [message #1737552] |
Sat, 09 July 2016 14:49  |
Eclipse User |
|
|
|
I have a reproducible (for me) problem with the Mint Cinnamon desktop locking up when hitting a breakpoint debugging with Eclipse. When I say it's locking up, I mean mouse clicks are completely inoperable (even on the Mint panel). Alt-Tab looks like it's working, but selecting another window doesn't focus or activate the window (only the Alt-Tab selector works).
Debugging and breakpoints work fine everywhere as far as I can tell except when the breakpoint is inside an anon inner class or lambda. When it "freezes", Ctrl-Alt-ESC restarts Cinnamon and everything proceeds fine after that.
Public git repo with a fairly simple example project causing this:
(I guess I can't post links - go to bitbucket.org/jfxexamples/eclipseminttest )
Linux Mint 17.3
Eclipse Neon 4.6.0
Java 8 (1.8.0_92) (Using JavaFX)
Code below (you'll have to grab the project files to run it though):
package application;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
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 {
BorderPane root = (BorderPane)FXMLLoader.load(getClass().getResource("Sample.fxml"));
Scene scene = new Scene(root,400,400);
scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} catch(Exception e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
launch(args);
}
}
package application;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.Tab;
import javafx.scene.control.TabPane;
public class SampleController {
@FXML
private TabPane tabPane;
public void createTab() {
Tab tab = new Tab("New tab");//Breakpoint here does NOT freeze desktop
// tab.setOnCloseRequest(e -> {
// System.out.println("bleh");//Breakpoint here, freezes desktop
// });
tab.setOnCloseRequest(new EventHandler<Event>(){
@Override public void handle(Event e){
System.out.println("bleh");//Breakpoint here, also freezes desktop
}
});
tabPane.getTabs().add(tab);//Breakpoint here does NOT freeze desktop
int index = tabPane.getTabs().size() - 1;
tabPane.getSelectionModel().select(index);
}
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.03790 seconds