Add warning for circ. guice depend.

This commit is contained in:
Manfred Karrer 2016-06-15 22:04:43 +02:00
parent ea525ba901
commit 6fefcfde7f

View File

@ -95,7 +95,9 @@ public class BitsquareApp extends Application {
}
@Override
public void start(Stage primaryStage) throws IOException {
public void start(Stage stage) throws IOException {
BitsquareApp.primaryStage = stage;
String logPath = Paths.get(env.getProperty(BitsquareEnvironment.APP_DATA_DIR_KEY), "bitsquare").toString();
Log.setup(logPath);
@ -132,8 +134,6 @@ public class BitsquareApp extends Application {
Utilities.removeCryptographyRestrictions();
Security.addProvider(new BouncyCastleProvider());
BitsquareApp.primaryStage = primaryStage;
shutDownHandler = this::stop;
try {
@ -246,7 +246,11 @@ public class BitsquareApp extends Application {
private void showErrorPopup(Throwable throwable, boolean doShutDown) {
if (!shutDownRequested) {
if (scene == null) {
log.warn("Scene not available yet, we create a new scene. The bug might be caused by a guice circular dependency.");
scene = new Scene(new StackPane(), 1000, 650);
scene.getStylesheets().setAll(
"/io/bitsquare/gui/bitsquare.css",
"/io/bitsquare/gui/images.css");
primaryStage.setScene(scene);
primaryStage.show();
}