JDK-8266228 : JavaFx WebView get Segmentation Fault in SpringBoot Fat Jar
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: openjfx17
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_10
  • CPU: x86_64
  • Submitted: 2021-04-23
  • Updated: 2021-04-29
  • Resolved: 2021-04-29
Related Reports
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
I have a SpringBoot Application that uses JavaFx and i added a Discord Oauth Authentication. It's working fine when i run it in Eclipse, but as soon as i create the Spring Fat Jar and run in on command line i get a segmentation fault.

I first thought that https://bugs.openjdk.java.net/browse/JDK-8242361 might be the same, but as far as i have seen that bug should be fixed in javafx-web 17-ea+7, which i use and i still get segmenation faults.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Load the Discord OAuth authorization website in a WebView inside a Spring fat jar.
Example URL
https://discord.com/oauth2/authorize?response_type=code&client_id=10&scope=identify&redirect_uri=https://www.blub.de/

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Authorization Page is shown in the WebView
ACTUAL -
Application crashs with a Segmentation Fault

---------- BEGIN SOURCE ----------
I made a little maven project to create the fat jar, which give me segmentation fault all the time when i call it https://github.com/tiramon/javafx_segfault

@Override
	public void start(Stage primaryStage) throws Exception {
		WebView wv = new WebView();
		wv.setContextMenuEnabled(false);
		WebEngine we = wv.getEngine();
		String authUrl = "https://discord.com/oauth2/authorize?response_type=code&client_id=10&scope=identify&redirect_uri=https://www.blub.de/";
		we.load(authUrl);
		Scene scene = new Scene(wv, 500, 750);
		primaryStage.setScene(scene);
		primaryStage.show();

	}
---------- END SOURCE ----------

FREQUENCY : always



Comments
It should have fixed it, but I'm still able to reproduce the issue in isMainThread. But in 17-ea+8 (isMainThread is replaced with native check), the issue is not reproducible.
29-04-2021

Are you sure that JDK-8263788 was the fix that also fixes this issue? It seems more likely related to JDK-8264990. You can close this bug as a duplicate of whichever bug fixed the crash.
29-04-2021

I can reproduce the crash. This bug (JDK-8263788) fixes the issue. Upgrading the org.openjfx.javafx-web version to 17-ea+8 in the pom.xml file also works as it contains the fix.
29-04-2021

Mail to submitter: Requesting hs_err file
29-04-2021

If by "fat jar" they mean a jar that has platform dependencies for more than one platform, then we do not support that. Having said that, it's possible that this is a real bug that would reproduce without the fat jar, so we should evaluate it. It would be helpful if we had a crash dump (hs_err file, if one is created).
28-04-2021