From 6fefcfde7f0b4060797d010db45345ec898ba830 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Wed, 15 Jun 2016 22:04:43 +0200 Subject: [PATCH] Add warning for circ. guice depend. --- gui/src/main/java/io/bitsquare/app/BitsquareApp.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java index ce5a40f866..cb97634662 100644 --- a/gui/src/main/java/io/bitsquare/app/BitsquareApp.java +++ b/gui/src/main/java/io/bitsquare/app/BitsquareApp.java @@ -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(); }