JDK-8113852 : Prism/ES2: RuntimeException: Error creating fragment shader for LCD text on Windows
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2011-07-11
  • Updated: 2015-06-16
  • Resolved: 2011-11-30
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.
Other
fx2.1Fixed
Related Reports
Blocks :  
Description
Here's the stack trace of the exception:

     [java] Ensemble2.goToPage[SAMPLES]
     [java] java.lang.reflect.InvocationTargetException
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
     [java] 	at com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:199)
     [java] 	at com.sun.prism.impl.ps.BaseShaderContext.getTextureSecondPassLCDShader(BaseShaderContext.java:246)
     [java] 	at com.sun.prism.impl.ps.BaseShaderContext.validateLCDOp(BaseShaderContext.java:420)
     [java] 	at com.sun.prism.impl.ps.BaseShaderGraphics.drawString(BaseShaderGraphics.java:1279)
     [java] 	at com.sun.javafx.sg.prism.NGText.renderContent(NGText.java:1006)
...
     [java] Caused by: java.lang.RuntimeException: Error creating fragment shader
     [java] 	at com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:151)
     [java] 	at com.sun.prism.es2.ES2ResourceFactory.createShader(ES2ResourceFactory.java:102)
     [java] 	at com.sun.prism.shader.Solid_TextureSecondPassLCD_Loader.loadShader(Solid_TextureSecondPassLCD_Loader.java:52)
     [java] 	... 106 more

I haven't seen the problem before and likely it's a regression introduced by some recent change (might be related to LCD text support).

The problem seems to be related to LCD shader and here's the shader compilation log (Solid_TextureSecondPassLCD.frag attached):

0(23) : error C1115: unable to find compatible overloaded function "any(vec3)"
0(26) : warning C7011: implicit cast from "float" to "vec3"
0(28) : warning C7011: implicit cast from "float" to "vec3"

We need to make sure that the shader source code conforms to GLSL specification.
Comments
Verified using 2.1 b17.
20-03-2012

changeset: 15028:22c7fc0861ba tag: tip user: Joseph Andresen<joseph.andresen@oracle.com> date: Wed Nov 30 10:51:06 2011 -0800 summary: RT:14946 LCD GLSL Shader Problem
30-11-2011

This is an error from when i added the any function to JSL. Fix is easy.
22-11-2011

To workaround this problem, use -Dprism.lcdtext=false.
11-07-2011