openjdk-jfx
openjdk-jfx copied to clipboard
[WebView] jvm not stopping after playing a GIF
If you display some gifs into the WebView and you close the application window, the java process hang. The issue is 100% reproducible on jdk 8 and jfx 11, Windows and macOS.
This test case use https://giphy.com but i can reproduce it on any website.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
WebView webView = new WebView();
webView.getEngine().load("https://giphy.com");
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(webView));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
A workaround is to call webView.getEngine().load("") on javafx stop method.
Test Configuration: JDK 12 and JavaFX 12 Result: I don't have the issue so it seams to be solved BUT I have a silent error after few pages from giphy.com:
com.sun.javafx.webkit.prism.WCMediaPlayerImpl onError WARNING: onError, errCode=270, msg=ERROR_MEDIA_CORRUPTED
I do not get this error on another website that does not have GIFs.
Other issue: However sometimes, after few gifs played (from giphy.com), the next ones get stuck.