update4j: Crash in javafx.web native code when loaded dynamically
Maintainer’s Note
If you bump into this issue, this will happen when javafx.web is dynamically loaded in the business application after config.launch(). This is a bug in the JavaFX web engine; you can track progress here.
Possible workarounds are:
- Load
javafx.webstatically on the JVM bootstrap classloader. You shouldn’t load it dynamically via update4j’s loading mechanism inconfig.launch(). - Load it dynamically, and both the bootstrap and the business apps share the same classloader. You should set
DynamicClassLoaderas the system classloader, as explained in the wiki. This won’t work with modules though. - Instead of launching via
config.launch()start a new JVM as the launch point.
Original Post
As the title says, whenever my business application tries to use a WebView from javafx.web, the application crashes producing a hs_err_pid_xxx.log thread dump file. The javafx-web module is loaded dynamically in the module path by update4j (along with the rest of the javafx modules, which have no issues whatsoever). I know update4j is to blame, since everything works fine if I launch the exact same business application directly. I am running OpenJDK 13.0.1+9 with JavaFX 15-ea+1 on a Mac. Any ideas?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 60 (31 by maintainers)
https://github.com/openjdk/jfx/commit/e02cee966780f5e3056db80851ef59929ab76ab0 Could this finally be the fix?? I will definitely give it a shot whenever I find the time…
@micheljung Since this issue is hard to follow I added a short summary in the original comment.
You could do the finalize check after shutdown, in a script, instead.