JDK-8128178 : Mac: GlassView2D/3D.lockedFocus boolean field isn't thread-safe
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: fx2.0.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-10-12
  • Updated: 2015-06-17
  • Resolved: 2011-10-25
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 7
7-poolFixed
Related Reports
Relates :  
Relates :  
Description
A fix for RT-13914 introduced a new boolean field in GlassView2D and GlassView3D objects: lockedFocus. It gets updated from the View.begin()/end() methods, and access to the field isn't synchronized currently. Since all known Glass clients invoke both begin() and end() on the same thread, this shouldn't cause any issues.

However, if we want to keep Glass thread-safe, we need to synchronize access to this field.
Comments
This issue was resolved by RT-17345
25-10-2011

Daniel, these assertions have been eliminated with a fix for RT-13914. Please fetch a recent build of 2.0.2 and try it out.
14-10-2011

Is that the reason for these traces that appear on Mac when assertions are enabled? 2011-10-14 10:47:04.103 java[699:903] *** Assertion failure in -[GlassView3D lockFocus], /SourceCache/AppKit/AppKit-1038.36/AppKit.subproj/NSView.m:5237 2011-10-14 10:47:04.105 java[699:903] lockFocus caught exception: -[GlassView3D(0x10015f920) lockFocus] failed with window=0x0, windowNumber=0, [self isHiddenOrHasHiddenAncestor]=0 2011-10-14 10:47:04.106 java[699:903] unlockFocus called too many time. Product: javafx-2.0.2beta Platform: macosx-universal Build-Number: 23 Build-ID: 2011-10-11_11-19-34
14-10-2011

I think I have the latest 2.0.2 master build (master b23 / promoted build b04) - so maybe the fix for RT-13914 has not yet been integrated in the master? Anyway if it's fixed I'm happy to wait until it gets integrated :-)
14-10-2011