JDK-8154852 : Glass bug: Prism software pipeline: CGLCreateContext error: 10002
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8,9
  • Priority: P5
  • Status: Closed
  • Resolution: Duplicate
  • OS: other
  • CPU: x86
  • Submitted: 2016-04-15
  • Updated: 2019-12-10
  • Resolved: 2016-07-29
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 9
9Resolved
Related Reports
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
FX9

ADDITIONAL OS VERSION INFORMATION :
MacOSX-10.11+vmware

A DESCRIPTION OF THE PROBLEM :
On macosx guest:

When running javafx with Prism software pipeline user get CGLCreateContext error: 10002 in glass native code so this error causes empty window without showing any controls in app window.

Note: This problem is reproducible on javafx8.

REGRESSION.  Last worked in version 9

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Enable Prism software pipeline with jvm arg -Dprsim.order=sw


ERROR MESSAGES/STACK TRACES THAT OCCUR :
CGLCreateContext error: 10002

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
Any javafx sample
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
The following patch fixes this issue and I can run Ensemple8 application successfully.

diff -r 3f15f2e59063 modules/graphics/src/main/native-glass/mac/GlassView3D.m
--- a/modules/graphics/src/main/native-glass/mac/GlassView3D.m	Wed Apr 13 12:36:43 2016 -0700
+++ b/modules/graphics/src/main/native-glass/mac/GlassView3D.m	Thu Apr 14 23:08:16 2016 +0430
@@ -93,9 +93,18 @@
         };
         GLint npix = 0;
         CGLError err = CGLChoosePixelFormat(attributes, &pix, &npix);
-        if (err != kCGLNoError)
+        if (pix == NULL)
         {
-            NSLog(@"CGLChoosePixelFormat error: %d", err);
+            const CGLPixelFormatAttribute attributes2[] =
+            {
+                kCGLPFAAllowOfflineRenderers,
+                (CGLPixelFormatAttribute)0
+            };
+            err = CGLChoosePixelFormat(attributes2, &pix, &npix);
+            if (err != kCGLNoError)
+            {
+                NSLog(@"CGLChoosePixelFormat error: %d", err);
+            }
         }
     }
     return pix;


Comments
This bug was addressed by the fix for JDK-8154148
29-07-2016

VMWare is not a supported platform. Related to this, the SW pipeline is not used on Mac in production, so this is a lower priority bug.
22-04-2016