JDK-8096004 : NGCanvas fails to unlock temporary texture while processing non-SrcOver blend modes
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-10-17
  • Updated: 2015-06-12
  • Resolved: 2013-10-17
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
8Fixed
Related Reports
Relates :  
Description
Running the "FullTutorial" CanvasTest toy from rt-closed, we get texture statistics being printed out starting from the "Operations" tab showing that some textures are left locked.

One source of these locked textures are due to a bug in NGCanvas that leaves a temporary texture locked after applying a non-SrcOver blending mode with the following stack trace showing where they were locked:

     [java] java.lang.Throwable: 1
     [java] 	at com.sun.prism.impl.ManagedResource.lock(ManagedResource.java:286)
     [java] 	at com.sun.prism.impl.ManagedResource.<init>(ManagedResource.java:197)
     [java] 	at com.sun.prism.impl.DisposerManagedResource.<init>(DisposerManagedResource.java:34)
     [java] 	at com.sun.prism.es2.ES2TextureResource.<init>(ES2TextureResource.java:34)
     [java] 	at com.sun.prism.es2.ES2RTTexture.create(ES2RTTexture.java:285)
     [java] 	at com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:101)
     [java] 	at com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:97)
     [java] 	at com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:193)
     [java] 	at com.sun.javafx.sg.prism.NGCanvas.renderStream(NGCanvas.java:901)
     [java] 	at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:522)

The rest are coming from the WebView code and a related bug RT-33625 was filed on those unbalanced lock()s.

(To get the stack traces of where unmatched locks occur, set the ManagedResource.trackLockSources flag to true...)
Comments
Verified for 8.0 b122
22-01-2014

The fix was verified by running the CanvasTest FullTutorial test and visiting all of the tabs and noting that the resource lock warnings are now gone. Note that the lock warnings were coming from a variety of root causes in that test case and so it wasn't clear if the warnings printed were coming from this particular issue or not unless a workspace was built with the trackLockSources flag turned on, but now that RT-33625 is also fixed I think that all of the sources of lock warnings should now be gone in that test case and so both bugs can be verified together on a standard build by observing a lack of resource lock warnings...
02-01-2014

Fixed in the 8.0 graphics scrum with the following changeset: changeset: 5422:41769f15fa26 date: Thu Oct 17 15:04:43 2013 -0700 summary: Fix RT-33626: NGCanvas fails to unlock temp textures for blend modes
17-10-2013