JDK-8120606 : Prism leaks OpenGL resources on Mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • Submitted: 2013-06-19
  • Updated: 2015-06-17
  • Resolved: 2013-10-15
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
8Resolved
Related Reports
Duplicate :  
Description
Currently both Glass and Prism leak OpenGL resources (textures and/or FBOs). The double_buffering.patch from RT-26702 fixes the leak in Glass, but resources are still leaked.

The problem  could be reproduced with the HelloWindowAbuse from rt-closed/toys. This app rapidly creates and destroys windows. On my system I can run up to 1000 windows which is followed by system-wide freezes. 

On the Mac OS X the following tools could be used to identify that these are leaks:
1. OpenGL profiler could calculate how many times we call genFBO/genTextures and deleteFBO/deleteTextures. It appears that during the HellowWindowAbuse run we allocate around 20% more resources than free. 
2. OpenGL Driver Monitor is able to track the number of textures currently allocated by the program. It shows the constant increase in this number. On my machine this tool is quite buggy, because sometimes it shows that we free more textures than allocate, so the number goes below zero. I am not sure is this is a bug in the tool or if this is due to some problems in FX code. 

These tools could be downloaded from the Apple's web site in Graphics Tools pack.

The problem was found on Mac OS X 10.7.5 and 10.8.3, other platforms were not tested.
Comments
[~petr.pchelko@oracle.com] Thanks for verifying the issue!
15-10-2013

Looks like the issue was already fixed by some other fix. I have the same situation on my machine now.
15-10-2013

Can't reproduce the system freeze. 1. Running default HelloWindowAbuse, count to 4600. Click on "Close" button. Force to quit by Ctrl+C. Based on trace generated by gltrace: glGenTextures 57,063 calls glDeleteTextures 57,043 calls glGenFramebuffers 19,653 calls glDeleteFramebuffers 19,647 calls 2. Set "OpenClose" to true, and then run HelloWindowAbuse, count to 10500. Click on "Close" button. App exited normally. Based on trace generated by gltrace: glGenTextures 126,926 calls glDeleteTextures 126,918 calls glGenFramebuffers 42,308 calls glDeleteFramebuffers 42,306 calls Although generated and deleted textures/fbos are not exact match, not likely does the latest build cause the system to freeze.
14-10-2013