"Shader status invalid" with latest jars and GLJpanel

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"Shader status invalid" with latest jars and GLJpanel

BFarns
Hi, I use jzy3d which uses JOGL, so I'm not that familiar with the code itself. This is also my first time posting and I didn't see any guidelines, but if I'm missing something and posting incorrectly please send me a link.

We were using JOGL v2-RC 11, running on Windows 7 with ATI firepro 2260 graphics cards. We have been experiencing jvm crashes as well as windows crashes recently when using JOGL (through jzy3d). The crashes seem to be related to removing and adding the canvases to panels, since it usually happens after doing this a few times it seems. We tried updating our drivers but were still getting the jvm crashes. For most of the crashes, the stack trace in the dump file looked almost identical to the one in this bug:

https://jogamp.org/bugzilla/show_bug.cgi?id=706

So I tried pulling the jars mentioned in the bug, as they said there was a workaround. I also tried the most recent jars, from May 11, but in both I get exceptions, which I posted below. This is using the GLJPanel (as you can see in the stack trace). Any pointers for what might have changed since RC11 that could cause this, how to fix?

Exception:

///
Shader status invalid: Fragment shader failed to compile with the following errors:
ERROR: 0:12: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.
ERROR:  compilation errors.  No code generated.

javax.media.opengl.GLException: Couldn't link program: ShaderProgram[id=1, linked=false, inUse=false, program: 1,
   ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader:  2, source]
   ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader:  3, source]]
        at jogamp.opengl.util.glsl.GLSLTextureRaster.init(GLSLTextureRaster.java:80)
        at javax.media.opengl.awt.GLJPanel$OffscreenBackend.initialize(GLJPanel.java:1045)
        at javax.media.opengl.awt.GLJPanel.createAndInitializeBackend(GLJPanel.java:766)
        at javax.media.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:401)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintChildren(Unknown Source)
        at javax.swing.JComponent.paint(Unknown Source)
        at javax.swing.JComponent.paintToOffscreen(Unknown Source)
        at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
        at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
        at javax.swing.RepaintManager.paint(Unknown Source)
        at javax.swing.JComponent._paintImmediately(Unknown Source)
        at javax.swing.JComponent.paintImmediately(Unknown Source)
        at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
        at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.awt.EventQueue$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
Reply | Threaded
Open this post in threaded view
|

Re: "Shader status invalid" with latest jars and GLJpanel

Xerxes Rånby
Hi your code only trigger an exception by your GPU driver.
This is probably identical to the
https://jogamp.org/bugzilla/show_bug.cgi?id=711 bug.
http://forum.jogamp.org/curve-TextRenderer-GL3-couldn-t-link-program-tp4028852.html


2013/5/15 BFarns [via jogamp] <ml-node+s762907n4029177h50@n3.nabble.com>
>
> Exception:
>
> ///
> Shader status invalid: Fragment shader failed to compile with the
> following errors:
> ERROR: 0:12: '' : Declaration must include a precision qualifier or the
> default precision must have been previously declared.
> ERROR:  compilation errors.  No code generated.
>
> javax.media.opengl.GLException: Couldn't link program: ShaderProgram[id=1,
> linked=false, inUse=false, program: 1,
>    ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader:  2, source]
>    ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader:  3,


Basically when using GL3 it is required to add precision qualifiers inside
the shader sourcecode or else you will hit this exception when the GPU
driver compiles the code.

Reply | Threaded
Open this post in threaded view
|

Re: "Shader status invalid" with latest jars and GLJpanel

Sven Gothel
Administrator
On 05/15/2013 10:43 PM, Xerxes Rånby [via jogamp] wrote:

> Hi your code only trigger an exception by your GPU driver.
> This is probably identical to the
> https://jogamp.org/bugzilla/show_bug.cgi?id=711 bug.
> http://forum.jogamp.org/curve-TextRenderer-GL3-couldn-t-link-program-tp4028852.html
>
> ERROR: 0:12: '' : Declaration must include a precision qualifier or the
> default precision must have been previously declared.
> ERROR:  compilation errors.  No code generated.
>
> Basically when using GL3 it is required to add precision qualifiers inside the
> shader sourcecode or else you will hit this exception when the GPU driver
> compiles the code.
Yup, will add unit tests w/ GL3 core only and GLJPanel (if non existent, ..hmm).
We will also need to catch the exception to follow the fallback
CPU based vertical flip strategy, in case of buggy GLSL compiler.

Thx for the bug report and reply.

~Sven

>
>
> 2013/5/15 BFarns [via jogamp] <[hidden email]>
>
>     Hi, I use jzy3d which uses JOGL, so I'm not that familiar with the code
>     itself. This is also my first time posting and I didn't see any
>     guidelines, but if I'm missing something and posting incorrectly please
>     send me a link.
>
>     We were using JOGL v2-RC 11, running on Windows 7 with ATI firepro 2260
>     graphics cards. We have been experiencing jvm crashes as well as windows
>     crashes recently when using JOGL (through jzy3d). The crashes seem to be
>     related to removing and adding the canvases to panels, since it usually
>     happens after doing this a few times it seems. We tried updating our
>     drivers but were still getting the jvm crashes. For most of the crashes,
>     the stack trace in the dump file looked almost identical to the one in
>     this bug:
>
>     https://jogamp.org/bugzilla/show_bug.cgi?id=706
>
>     So I tried pulling the jars mentioned in the bug, as they said there was a
>     workaround. I also tried the most recent jars, from May 11, but in both I
>     get exceptions, which I posted below. This is using the GLJPanel (as you
>     can see in the stack trace). Any pointers for what might have changed
>     since RC11 that could cause this, how to fix?
>
>     Exception:
>
>     ///
>     Shader status invalid: Fragment shader failed to compile with the
>     following errors:
>     ERROR: 0:12: '' : Declaration must include a precision qualifier or the
>     default precision must have been previously declared.
>     ERROR:  compilation errors.  No code generated.
>
>     javax.media.opengl.GLException: Couldn't link program: ShaderProgram[id=1,
>     linked=false, inUse=false, program: 1,
>        ShaderCode[id=1, type=VERTEX_SHADER, valid=true, shader:  2, source]
>        ShaderCode[id=2, type=FRAGMENT_SHADER, valid=false, shader:  3, source]]
>             at
>     jogamp.opengl.util.glsl.GLSLTextureRaster.init(GLSLTextureRaster.java:80)
>             at
>     javax.media.opengl.awt.GLJPanel$OffscreenBackend.initialize(GLJPanel.java:1045)
>
>             at
>     javax.media.opengl.awt.GLJPanel.createAndInitializeBackend(GLJPanel.java:766)
>             at javax.media.opengl.awt.GLJPanel.paintComponent(GLJPanel.java:401)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintChildren(Unknown Source)
>             at javax.swing.JComponent.paint(Unknown Source)
>             at javax.swing.JComponent.paintToOffscreen(Unknown Source)
>             at
>     javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
>             at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
>             at javax.swing.RepaintManager.paint(Unknown Source)
>             at javax.swing.JComponent._paintImmediately(Unknown Source)
>             at javax.swing.JComponent.paintImmediately(Unknown Source)
>             at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
>             at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
>             at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
>             at
>     javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown
>     Source)
>             at java.awt.event.InvocationEvent.dispatch(Unknown Source)
>             at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
>             at java.awt.EventQueue.access$000(Unknown Source)
>             at java.awt.EventQueue$1.run(Unknown Source)
>             at java.awt.EventQueue$1.run(Unknown Source)
>             at java.security.AccessController.doPrivileged(Native Method)
>             at
>     java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
>             at java.awt.EventQueue.dispatchEvent(Unknown Source)
>             at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
>     Source)
>             at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>             at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
>     Source)
>             at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>             at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>             at java.awt.EventDispatchThread.run(Unknown Source)
>
>     ------------------------------------------------------------------------------
>     If you reply to this email, your message will be added to the discussion
>     below:
>     http://forum.jogamp.org/Shader-status-invalid-with-latest-jars-and-GLJpanel-tp4029177.html
>
>     To start a new topic under jogl, email [hidden email]
>     To unsubscribe from jogamp, click here.
>     NAML
>     <http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
>
> ------------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion below:
> http://forum.jogamp.org/Shader-status-invalid-with-latest-jars-and-GLJpanel-tp4029177p4029178.html
>
> To start a new topic under jogl, email [hidden email]
> To unsubscribe from jogl, click here
> <
> NAML
> <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>

--
health & wealth
mailto:[hidden email] ; http://jausoft.com
land : +49 (471) 4707742 ; fax : +49 (471) 4707741
Timezone CET: PST+9, EST+6, UTC+1


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: "Shader status invalid" with latest jars and GLJpanel

Sven Gothel
Administrator
In reply to this post by Xerxes Rånby
On 05/16/2013 12:19 AM, Sven Gothel wrote:

> On 05/15/2013 10:43 PM, Xerxes Rånby [via jogamp] wrote:
>> Hi your code only trigger an exception by your GPU driver.
>> This is probably identical to the
>> https://jogamp.org/bugzilla/show_bug.cgi?id=711 bug.
>> http://forum.jogamp.org/curve-TextRenderer-GL3-couldn-t-link-program-tp4028852.html
>>
>> ERROR: 0:12: '' : Declaration must include a precision qualifier or the
>> default precision must have been previously declared.
>> ERROR:  compilation errors.  No code generated.
>>
>> Basically when using GL3 it is required to add precision qualifiers inside the
>> shader sourcecode or else you will hit this exception when the GPU driver
>> compiles the code.
>
> Yup, will add unit tests w/ GL3 core only and GLJPanel (if non existent, ..hmm).
> We will also need to catch the exception to follow the fallback
> CPU based vertical flip strategy, in case of buggy GLSL compiler.
>
https://jogamp.org/bugzilla/show_bug.cgi?id=737

GLSL spec [1.30 - 1.40] section 4.5.3 states that fragment program requires a
[default] precision for float values.
Note: GLSL spec >= 1.50 does _not_ require such default precision.

Will rework our ShaderCode customization.


signature.asc (911 bytes) Download Attachment