JDK-8092835 : Scene turns black sometimes
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-12-18
  • Updated: 2015-06-12
  • Resolved: 2014-04-02
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.
JDK 8
8u20Fixed
Related Reports
Relates :  
Relates :  
Description
This may be related to RT-33028. This has been happening for a few builds now, and is currently happening in b120.

I leave the app I work on running & sometimes lately it has been black. When I wave my mouse around the screen eventually repaints.

This manifestation isn't reproducible (the way the symptoms were the last time I reported this in RT-34410).

At first I thought this only happened when unlocking my machine, but not consistently. Just now, however, my application's window was mostly, but not completely, covered by other windows. I worked in some other applications & then I saw the sliver of my window that was not covered (maybe 5 - 10% of the total area) turned black.

When I clicked on the window to bring it to the front, the whole window was black except for one or two buttons.
Comments
Changeset: f7a7a5de1a4c Author: vadim Date: 2014-04-02 09:46 +0400 URL: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/f7a7a5de1a4c
02-04-2014

1) You need to either add curly braces around the "if" target, or put the return on the same line (we don't allow single-statements as the target of a conditional since it is error prone) : if (!wasLost) return false; 2) We only normally refer to a bug ID in a code comment if we are adding a workaround, or if there is follow-on work to be done (and we refer to a still-outstanding bug), so I recommend removing the reference to this bug ID in the following comment: // Notify caller that the device was reset, see RT-35025 Approved, as long as you make at least the change pointed out in #1.
01-04-2014

Does the fix also resolve RT-31272 by any chance?
28-03-2014

Chien, Kevin, Please review a fix for this: http://cr.openjdk.java.net/~vadim/RT-35025/webrev.00/ RT-33028 and RT-34557 are related to this. Actually these fixes are incomplete. Easy way to reproduce this bug is this: Run HelloControls (or SB), click on the taskbar (or switch to the other app) so the app is not in focus. Press Ctrl-Alt-Del (or Win+L) to force device lost. Switch back to the application and observe a black scene. What's happening here is that after the screen lock FX try to repaint only when gained focus again. So the painter calls isDeviceReady which tests device state and gets D3DERR_DEVICENOTRESET and immediately resets the device. After successful reset it returns true, which doesn't trigger entireSceneNeedsReset() call in the painter. Proposed fix is to return false from the testLostStateAndReset() function in case when we actually reset the device without setting its lost state so the entire scene will be reset.
28-03-2014

OK. Thanks for confirming that.
28-03-2014

Nope, sorry, I still can reproduce RT-31272 with HelloControls
28-03-2014

It happened again. This time the application window was mostly covered and the parts that weren't covered were painted normally. I clicked on the title bar to bring the window to the front. When it came to the front, the whole window turned black (except for a few small areas).
18-12-2013