scenebuilder icon indicating copy to clipboard operation
scenebuilder copied to clipboard

Cannot open multiple instances of Scene Builder (e.g. to compare SB11 vs. SB15 or SB16)

Open Oliver-Loeffler opened this issue 4 years ago • 7 comments

Starting multiple instances of SceneBuilder does not work.

Expected Behavior

  • running SceneBuilder.exe (from link or from CLI) shall open a new Scene Builder window
  • repeated execution of SceneBuilder.exe should open a new window backed by an independen new instance
  • Logfile shoud indicate issue
  • As JavaFX shows warnings when using different FXML versions, for some scenarios it can be useful to run multiple instances of SceneBuilder.
  • If it is intentional to only have one instance, question: Would it be possible to allow multiple instances for different Scene Builder versions?

Current Behavior

  • Opening multiple windows by creating a new view from template or opening a FXML file works.
  • Starting a single instance using SceneBuilder.exe works.
  • Starting a second instance of SceneBuilder (regardless if same version or different version) does not work
  • Logfile is empty

Steps to Reproduce

  • Open new instance of Scene Builder 16
  • Attempt to open second instance of Scene Builder 16/15/11
  • Attempt to run SceneBuilder using Maven or from within Eclipse
  • In all attempts, I was not able to obtain any useful information from Scene Builder logfile.

Running tests entirely from IDE helped me as follows:

  • Start first Scene Builder instance from within Eclipse using a Run Configuration.
  • Attempt to start second instance ... will fail with a stack trace:
Apr. 01, 2021 6:18:37 NACHM. com.oracle.javafx.scenebuilder.app.SceneBuilderApp$SceneBuilderUncaughtExceptionHandler uncaughtException
SEVERE: An exception was thrown:
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
	at java.base/java.util.Objects.checkIndex(Objects.java:372)
	at java.base/java.util.ArrayList.get(ArrayList.java:458)
	at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleOpenFilesAction(SceneBuilderApp.java:506)
	at com.oracle.javafx.scenebuilder.app.AppPlatform$MessageBoxDelegate.lambda$0(AppPlatform.java:186)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:447)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:446)
	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at java.base/java.lang.Thread.run(Thread.java:834)

Environment

  • Windows 10 Pro
  • Version 20H2
  • Build 19042.867
  • Windows Feature Experience Pack 120.2212.551.0

Screenshots

SceneBuilder2ndInstanceStackTraceAtLaunch

Oliver-Loeffler avatar Apr 01 '21 16:04 Oliver-Loeffler