JDK-8089308 : Random black areas rendered
  • Type: Bug
  • Component: javafx
  • Sub-Component: web
  • Affected Version: 8
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2013-10-16
  • Updated: 2019-03-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Version affected: 8 b111.

Various nodes in the scenegraphs are sometimes rendered as black areas.

As this happens within a non-trivial application, I cannot presently offer a simple reproducible case, but I can give some general information about the context within which it appears. I have two seperate stages, in one is a TableView, when a row here is focused the scenegraph in the second stage is updated. After around (consistently) 30 or so updates of the second stage's scenegraph, various unrelated areas in both stages appear as black. On subsequent next updates some different, some same (changing for each update) areas appear black. Minimizing and maximizing the application brings everything black to normal, but then the black arears appear again on the next update of the second stage's scenegraph.

If this is a completely unknown problem I'll spend some time with trying to create a reproducible example.
Comments
��� and I can no longer make it happen (the "list turns grey") problem. If I can get it to happen, I will open the new bug.
07-01-2014

I think there are two bugs here. The BlackBug code causes grey areas and is a dirty op bug. I will enter a new JIRA for it.
07-01-2014

Sounds a bit like this one: RT-34317
07-01-2014

This seems to be a hard-to-reproduce issue, and is a transient failure, so we would like to defer it out of FX 8.
21-11-2013

I can confirm that running without dirty ops fixes it.
21-11-2013

It does appear on Windows 7 for me.
16-11-2013

I see what might be the problem on Mac. When I click like mad up and down the list, eventually the entire window that contains the list turns gray except for the previous and next list item that I have clicked. This look like dirty ops rather than resource leaking (on Mac).
15-11-2013

I don't see the problem on Windows 7.
15-11-2013

package bugs; import javafx.application.Application; import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.layout.BorderPane; import javafx.scene.layout.Region; import javafx.scene.control.ListView; import javafx.collections.FXCollections; import javafx.scene.control.Label; import javafx.scene.web.WebView; import javafx.geometry.Insets; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; public class BlackBug extends Application { public void start(Stage stage) { BorderPane root = new BorderPane(); ListView<String> list = new ListView<>(); list.setItems(FXCollections.observableArrayList( "http://www.oracle.com", "http://www.google.com", "http://www.microsoft.com", "http://www.apple.com")); final BorderPane secondRoot = new BorderPane(); list.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() { public void changed(ObservableValue<? extends String> ov, String oldValue, String newValue) { if (newValue != null) { WebView webView = new WebView(); secondRoot.setCenter(webView); Label label = new Label(newValue); secondRoot.setTop(label); webView.getEngine().load(newValue); } } }); root.setCenter(list); Stage secondStage = new Stage(); secondStage.initOwner(stage); stage.setScene(new Scene(root, 800, 600)); stage.show(); secondStage.setScene(new Scene(secondRoot, 600, 300)); secondStage.show(); } public static void main(String[] args) { launch(args); } }
15-11-2013

This might be related to / caused by RT-32845.
15-11-2013

What platform does this happen on?
15-11-2013

Please provide deferral justification.
12-11-2013

Assign to WebView component in that case.
29-10-2013

Verified that the dirty regions are reasonable and cover only the two affected rows (the old and the new one). Sometimes, there's a dirty region covering the whole ListView, but at the time the bug appears, the dirty region is always covering only the 2 rows (and is correct). The black areas cover the complement of the dirty region, so it looks like the texture was somehow corrupted and only the newly rendered areas are thus visible. I suspect the WebView is doing this as this is reproducible only when there are some webpages loaded (i.e. it wasn't reproducible w/o proxy) and it also takes significantly longer to reproduce when the sites are simple (like 2 javadoc pages).
22-10-2013

Test case: https://gist.github.com/kavedaa/7068360 Select an item in the list. Then change selection around 10-20 times, waiting for the web content to load each time. One or more of the following areas should turn black: * The entire empty part of the list. * One or several items in the list. * The label at the top of the second stage. With a little patience you might also trigger the following exception: [error] java.lang.NullPointerException [error] java.lang.IllegalStateException: Unbalanced saveState/restoreState [error] at com.sun.javafx.webkit.prism.WCGraphicsPrismContext.dispose(WC GraphicsPrismContext.java:1576) [error] at com.sun.javafx.webkit.prism.WCPageBackBufferImpl.disposeGraph ics(WCPageBackBufferImpl.java:40) [error] at com.sun.webkit.WebPage.paint(WebPage.java:639) [error] at com.sun.javafx.sg.prism.NGWebView.renderContent(NGWebView.jav a:73) [error] at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2036) [error] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945) [error] at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:22 5) [error] at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java: 473) [error] at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2036) [error] at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945) [error] at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.jav a:472) [error] at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.j ava:324) [error] at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPai nter.java:88) [error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors .java:511) [error] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:3 08) [error] at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58) [error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolE xecutor.java:1142) [error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPool Executor.java:617) [error] at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.ru n(QuantumRenderer.java:129) [error] at java.lang.Thread.run(Thread.java:724)
20-10-2013

Yes, I'm not able to reproduce when using that switch (and it appears consistently without it).
19-10-2013

Martin: can you take a look at this, once Knut provides a test case?
19-10-2013

This is not a known issue. One question: does running with "-Dprism.dirtyopts=false" affect the behavior?
18-10-2013