-
Bug
-
Resolution: Duplicate
-
P3
-
8u102
FULL PRODUCT VERSION :
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The issue is with WebView component. Sometimes if the application stays idle for a few minutes, the display is just a blank screen and WebView is not rendered on the stage. Other times it works perfectly fine. Also once a particular WebView component fails to render onto the screen, all other WebViews throughout the application fail to load.
The component behaves very inconsistently and I couldn't identify a definitive pattern to replicate the issue.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open a page with WebView component in it.
2. Go to a different page with no WebView components.
3. Leave the application idle for about 10 minutes.
4. Load the page with WebView component. The page loads but the WebView component is not rendered.
---------------------------------
My WebView code:
---------------------------------
String htmlBillText = billTextController.transformBillXmlXsl();
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setOnError((WebErrorEvent event) -> {
// NEVER GOES INTO THIS AT ALL
System.out.println("event.getMessage()::"+event.getMessage());
System.out.println("event.getException()::"+event.getException().getMessage());
System.out.println("event.toString()::"+event.toString());
engine.reload();
});
engine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
@Override
public void changed(ObservableValue ov, Worker.State oldState, Worker.State newState) {
System.out.println("oldState::" + oldState);
System.out.println("newState::" + newState);
if (engine.getLoadWorker().getException() != null) {
System.out.println("engine.getLoadWorker().getException()::" + engine.getLoadWorker().getException().getLocalizedMessage());
}
if (engine.getLoadWorker().getException() != null && newState == Worker.State.FAILED) {
System.out.println(engine.getLoadWorker().getException().getMessage());
}
if (newState == Worker.State.SUCCEEDED) {
System.out.println("engine.getDocument()::"+engine.getDocument());
if (engine.getDocument() != null) {
String html = (String) engine.executeScript("document.documentElement.innerHTML");
if (StringUtils.isEmpty(html)) {
System.out.println("FX WebView Engine Failed To Load Content... Execute Reload...");
engine.reload();
}
}
System.out.println("engine.getTitle()::" + engine.getTitle());
System.out.println("engine.getLocation()::" + engine.getLocation());
System.out.println("engine.getUserAgent()::" + engine.getUserAgent());
System.out.println("engine.getUserDataDirectory()::" + engine.getUserDataDirectory());
System.out.println("engine.isJavaScriptEnabled()::" + engine.isJavaScriptEnabled());
}
}
});
engine.loadContent(htmlBillText);
-----------------------------------------------------------------------------------
MY DISPLAY CONSOLE WHEN WEBVIEW FAILS TO LOAD:
-----------------------------------------------------------------------------------
oldState::READY
newState::SCHEDULED
oldState::SCHEDULED
newState::RUNNING
oldState::RUNNING
newState::SUCCEEDED
engine.getDocument()::[object HTMLDocument]
engine.getTitle()::SB6:v98#DOCUMENT
engine.getLocation()::
engine.getUserAgent()::Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/538.19 (KHTML, like Gecko) JavaFX/8.0 Safari/538.19
engine.getUserDataDirectory()::null
engine.isJavaScriptEnabled()::true
---------------------------------------------------------------------------------
Thanks. -Sirish Vadala
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The WebView should always load and render the content even if the application stays idle for a certain period of time, at least for 15-20 minutes.
ACTUAL -
The page loads but the WebView component within the page is not rendered. The engine loads the content as per the output console, but the WebView fails to render on to the screen. This happens so inconsistently, with no definitive pattern, but usually keeping the application idle for a while makes it happen.
Output console when application fails:
---------------------------------------------------
oldState::READY
newState::SCHEDULED
oldState::SCHEDULED
newState::RUNNING
oldState::RUNNING
newState::SUCCEEDED
engine.getDocument()::[object HTMLDocument]
engine.getTitle()::SB6:v98#DOCUMENT
engine.getLocation()::
engine.getUserAgent()::Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/538.19 (KHTML, like Gecko) JavaFX/8.0 Safari/538.19
engine.getUserDataDirectory()::null
engine.isJavaScriptEnabled()::true
REPRODUCIBILITY :
This bug can be reproduced often.
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The issue is with WebView component. Sometimes if the application stays idle for a few minutes, the display is just a blank screen and WebView is not rendered on the stage. Other times it works perfectly fine. Also once a particular WebView component fails to render onto the screen, all other WebViews throughout the application fail to load.
The component behaves very inconsistently and I couldn't identify a definitive pattern to replicate the issue.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open a page with WebView component in it.
2. Go to a different page with no WebView components.
3. Leave the application idle for about 10 minutes.
4. Load the page with WebView component. The page loads but the WebView component is not rendered.
---------------------------------
My WebView code:
---------------------------------
String htmlBillText = billTextController.transformBillXmlXsl();
WebView webView = new WebView();
WebEngine engine = webView.getEngine();
engine.setOnError((WebErrorEvent event) -> {
// NEVER GOES INTO THIS AT ALL
System.out.println("event.getMessage()::"+event.getMessage());
System.out.println("event.getException()::"+event.getException().getMessage());
System.out.println("event.toString()::"+event.toString());
engine.reload();
});
engine.getLoadWorker().stateProperty().addListener(new ChangeListener<Worker.State>() {
@Override
public void changed(ObservableValue ov, Worker.State oldState, Worker.State newState) {
System.out.println("oldState::" + oldState);
System.out.println("newState::" + newState);
if (engine.getLoadWorker().getException() != null) {
System.out.println("engine.getLoadWorker().getException()::" + engine.getLoadWorker().getException().getLocalizedMessage());
}
if (engine.getLoadWorker().getException() != null && newState == Worker.State.FAILED) {
System.out.println(engine.getLoadWorker().getException().getMessage());
}
if (newState == Worker.State.SUCCEEDED) {
System.out.println("engine.getDocument()::"+engine.getDocument());
if (engine.getDocument() != null) {
String html = (String) engine.executeScript("document.documentElement.innerHTML");
if (StringUtils.isEmpty(html)) {
System.out.println("FX WebView Engine Failed To Load Content... Execute Reload...");
engine.reload();
}
}
System.out.println("engine.getTitle()::" + engine.getTitle());
System.out.println("engine.getLocation()::" + engine.getLocation());
System.out.println("engine.getUserAgent()::" + engine.getUserAgent());
System.out.println("engine.getUserDataDirectory()::" + engine.getUserDataDirectory());
System.out.println("engine.isJavaScriptEnabled()::" + engine.isJavaScriptEnabled());
}
}
});
engine.loadContent(htmlBillText);
-----------------------------------------------------------------------------------
MY DISPLAY CONSOLE WHEN WEBVIEW FAILS TO LOAD:
-----------------------------------------------------------------------------------
oldState::READY
newState::SCHEDULED
oldState::SCHEDULED
newState::RUNNING
oldState::RUNNING
newState::SUCCEEDED
engine.getDocument()::[object HTMLDocument]
engine.getTitle()::SB6:v98#DOCUMENT
engine.getLocation()::
engine.getUserAgent()::Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/538.19 (KHTML, like Gecko) JavaFX/8.0 Safari/538.19
engine.getUserDataDirectory()::null
engine.isJavaScriptEnabled()::true
---------------------------------------------------------------------------------
Thanks. -Sirish Vadala
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The WebView should always load and render the content even if the application stays idle for a certain period of time, at least for 15-20 minutes.
ACTUAL -
The page loads but the WebView component within the page is not rendered. The engine loads the content as per the output console, but the WebView fails to render on to the screen. This happens so inconsistently, with no definitive pattern, but usually keeping the application idle for a while makes it happen.
Output console when application fails:
---------------------------------------------------
oldState::READY
newState::SCHEDULED
oldState::SCHEDULED
newState::RUNNING
oldState::RUNNING
newState::SUCCEEDED
engine.getDocument()::[object HTMLDocument]
engine.getTitle()::SB6:v98#DOCUMENT
engine.getLocation()::
engine.getUserAgent()::Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/538.19 (KHTML, like Gecko) JavaFX/8.0 Safari/538.19
engine.getUserDataDirectory()::null
engine.isJavaScriptEnabled()::true
REPRODUCIBILITY :
This bug can be reproduced often.
- duplicates
-
JDK-8166999 Update to newer version of WebKit
-
- Resolved
-