Hi, Alexey.
When I last time looked to this code I got an impression that we have
the next sequence of references:
_SurfaceDataOps.sdObject->CGLSurfaceData.graphicsConfig->CGLGraphicsConfig
In this case the java side cannot be deallocated while we have a
reference in native. Why it does not work? Probably it will be simpler
to fix this case instead of creation of the separate map of references?
On 30/12/15 00:26, Alexey Ushakov wrote:
Hello,
Here is the fix for openjdk9 of the crash in OGL pipeline on OSX , please have
a look. The problem is also reproducible in JDK7 and JDK8
Bug :https://bugs.openjdk.java.net/browse/JDK-8146238
Webrev :http://cr.openjdk.java.net/~avu/JDK-8146238/webrev.00/
Issue : jdk crashes inJava2D Queue Flusher after minimising/maximising heavy
swing app
(IntelliJ IDEA for example) and changing user account, see the bug for
more details
Root cause : CGLSurfaceData native data requires CGLGraphicsConfig native data
for deallocation, however after disposing appropriate java objects
(CGLGraphicsConfig and CGLSurfaceData) CGLGraphicsConfig native data might be
deallocated before appropriate CGLSurfaceData native data, so deallocating
latter causes crash
Solution : Added reference counting for CGLGraphicsConfig native data in order
to dispose it after all native pointers for CGLSurfaceData objects
Best Regards,
Alexey
--
Best regards, Sergey.