0

The problem: I strongly suspect WindowBuilder makes my Eclipse crashing under certain conditions. These conditions are:

  1. the class you're working on it using the design tab has to contain some references to a JavaFX code
  2. first time you design such class it's all good. Second time you click on design tab of another class of that kind, or click on "Reparse source and refresh design page" icon inside the design view of the first class, Eclipse crashes. Essentially, parsing the code of such classes for a second time is where it crashes.

My context: I'm coding a gui hangman game using Swing and JavaFX libs. I'm aware of the conditions for interoperability between these two guys.

I'm using Eclipse IDE for Java Developers Version: 2021-12 (4.22.0) (the current one the installer installs on your computer). The JDK 17.0.1 (installer on Oracle site for Windows x64) and I'm on Windows 10 x64.

Enviroment variables (JAVA_HOME and PATH_TO_FX) and Eclipse project settings (non modular project is my case) should be ok: my code is compiled, my program runs without troubles, I see the gui and everything is where it should be and working. But to be sure I've tried to reproduce the crash with the code of more experienced people of me for sure (article link, repository link) and it crashes in the same way. I'm gonna post my code if required of course.

I'm using WindowBuilder 1.9.8, the last good build, cause a bug me and other people have encountered (see here, here and here) has been fixed there. Anyway, it crashes even with previous versions.

I'm gonna post a bunch of additional info about logs and crash reports, please skip it to the end if you think there's no need of additional info.

I'm running Eclipse with the -consoleLog parameter in the .ini file to have the log in a shell window at runtime. This is the relevant part of the log once it ends to load Eclipse:

java.lang.Error: SWT Resource was not properly disposed

and this is what it says when I click on the design tab of a JavaFX referenced class:

com.sun.javafx.application.PlatformImpl startup WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @3d79168b'

but as I said, my project settings should be ok: running configurations -> java application -> main class -> vm arguments:

--module-path ${PATH_TO_FX} --add-modules=javafx.graphics,javafx.controls,javafx.fxml,javafx.base,javafx.media,javafx.web,javafx.swing

Yes, I know there's no need to load all modules, but just to be sure. And yes, I've even read this, but seems like I'm getting this warning anyway.

When I click on the "Reparse source and refresh design page" icon inside the design view, It freezes and have to terminate the process. The crash report says:

"Java was started but returned exit code= -8053063696"

So I looked for it, found this, tried everything (even to unistall the jdk, eclipse including the .p2 folder), but still the same problem

When I try to open the design tab on another JavaFX related class the crash report is different:

"Java was started but returned exit code= 1"

So I've read this, but my enviroment variables should be properly setted and everything should be correctly installed. I've even edit the .ini file to add the reference to the Java Virtual Machine dll, but still the same problem.

My question: can you reproduce this crash? There's a fix or I'm doing something wrong?

p.s. I'm getting the "Wait! Some of your past questions have not been well-received, and you're in danger of being blocked from asking any more." warning here on stackoverflow :( I've read this and I hope this question it's ok

Goet
  • 57
  • 1
  • 1
  • 8
  • 1
    "I'm coding a gui hangman game using Swing and JavaFX libs." -> my advice is: don't do this, instead write your game in Swing or JavaFX, not Swing and JavaFX. – jewelsea Jan 04 '22 at 15:59
  • Hi jewelsea thanks for the comment. Well it would be easier for sure. The thing is I "know" Swing a lot better and I'm trying to introduce some "cool" animations more as a pretext to approach animations and JavaFX in general while being able to produce something without starting from the beginning. My previous project was pure Swing. My next one will be pure FX I guess :) Still, was curious to know if Eclipse crashes cause me being dumb or there's indeed a problem with WindowBuilder in that context – Goet Jan 04 '22 at 18:40
  • I think you mistyped about what you know ;-) Check that you used [VM arguments not program arguments](https://openjfx.io/openjfx-docs/images/ide/eclipse/ide/eclipse06.png). Try using a JDK which includes JavaFX such as Belsoft Liberica or Corretto. Ensure that you can create a simple JavaFX application from scratch before you try JavaFX <-> Swing integration. "WARNING: Unsupported JavaFX configuration" means you are trying to run JavaFX off the classpath rather than the module path -> your VM arguments are either incorrect or not used. It is just a warning, probably not your error. – jewelsea Jan 04 '22 at 20:04
  • Yup I forgot to type "vm" before "arguments" in my post, just edited, thanks :) By the way I've already tested if my setup is able to run a simple JavaFX project (see [PATH_TO_FX](https://openjfx.io/openjfx-docs/#install-javafx)), and more in general is able to run all the little JavaFX programs I tried to code and that I've found on internet. As far as I read/understand, JavaFX not only needs to be placed in the module path to be able to work, but you have to specify even what modules it has to load in the running configuration. I've done both, but I get that warning anyway... argh – Goet Jan 04 '22 at 20:33
  • 1
    I'll try to use one of your suggested JDK to see if WindowBuilder still makes the whole thing crash this weekend probably. Worth a try :) – Goet Jan 04 '22 at 20:38
  • You should file your report with the developers and not on StackOverflow. SO is not meant to file bug reports. File bug reports for windowbuilder here: https://github.com/eclipse/windowbuilder – Yaza Jan 26 '22 at 22:40

0 Answers0