RV ERROR "shader? bad tokens?"

Hey all,
Several of my animators (randomly) are getting the following error when opening up RV now:

ERROR: 0:3: ‘#version’ : must occur first in shader
ERROR: 0:3: ‘#version’ : bad profile name; use es, core, or compatibility
ERROR: 0:3: ‘#version’ : bad tokens following profile – expected newline
ERROR: 0:3: ‘’ : missing #endif
ERROR: 0:3: ‘’ : compilation terminated
ERROR: 5 compilation errors. No code generated.
ERROR: 0:3: ‘#version’ : must occur first in shader
ERROR: 0:3: ‘#version’ : bad profile name; use es, core, or compatibility
ERROR: 0:3: ‘#version’ : bad tokens following profile – expected newline
ERROR: 0:3: ‘’ : missing #endif
ERROR: 0:3: ‘’ : compilation terminated
ERROR: 5 compilation errors. No code generated.

This then repeats several times until dumping out this:

INFO: loaded ShotGrid config module ‘shotgrid_fields_config_standard’ (C:/Program Files/ShotGrid/RV-2022.3.0/plugins/Mu/shotgrid_fields_config_standard.mu)
INFO: using shotgrid server ‘https://WEBSITE.URL.REMOVED.FOR.SECURITY
INFO: C:/Users/username/OneDrive - Gearbox Software/Desktop/file.mov
INFO: sgtk_rv_bootstrap Looking for tk-core here: C:/Program Files/ShotGrid/RV-2022.3.0\src\python\sgtk\baked\plugin\bundle_cache\baked\tk-config-rv\v1.4.0\install\core\python
INFO: sgtk_rv_bootstrap:Looking for tk-core here: C:/Program Files/ShotGrid/RV-2022.3.0\src\python\sgtk\baked\plugin\bundle_cache\baked\tk-config-rv\v1.4.0\install\core\python
INFO: Toolkit initialization: ready to import sgtk at 0.00154305 sec.
INFO: Toolkit initialization: sgtk import complete at 0.679017 sec.
INFO: sgtk_rv_bootstrap:Will connect using
INFO: Toolkit initialization: ToolkitManager complete at 0.882267 sec.

Anyone know why this error is popping up for SOME of our animators and not all? Or better yet - how do we fix this error?

Thanks!

Anyone?

Hey did you ever figure out the fix for this issue or what the actual problem is?

Hi @MWARD and @lennyfoulds,

I would try to update the GPU Drivers. It looks like RV can’t compile the shaders.

hey geffrak, I reinstalled my GPU drivers and then reinstalled a couple different versions of RV and still get the same error. Any other ideas? I’m on Windows 10 if that helps.

No fix over here! Still an issue.

can you run RV from a console and use -debug shader and when it produces that error output, can you provide the output near that?

That should help diagnose what sort of shader was generated.

Also, what GPU do these machines have?

-Kessler

I have an AMD Radeon RX 5700 XT as a GPU and here is the output:

C:\Users\jared>"C:\Program Files\ShotGrid\RV-2022.3.1\bin\rv.exe" -debug shader

C:\Users\jared>INFO: Using 'C:\Users\jared' for $HOME.
C:\Program Files\ShotGrid\RV-2022.3.1\bin\rv.exe
Version 2022.3.1, built on Sep 13 2022 at 23:16:46 (HEAD=6c705adc5). (L)
Copyright (c) 2022 Autodesk, Inc. All rights reserved.
WARNING: missing doc directory in bundle
WARNING: missing html directory in bundle
INFO: debugging message "shader"
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
ERROR: 0:3: '#version' : must occur first in shader
ERROR: 0:3: '#version' : bad profile name; use es, core, or compatibility
ERROR: 0:3: '#version' : bad tokens following profile -- expected newline
ERROR: 0:3: '' : missing #endif
ERROR: 0:3: '' : compilation terminated
ERROR: 5 compilation errors.  No code generated.
P
INFO: loaded ShotGrid config module 'shotgrid_fields_config_standard' (C:/Program Files/ShotGrid/RV-2022.3.1/plugins/Mu/shotgrid_fields_config_standard.mu)

Okay, looks like there’s no output from a shader, likely because one is never generated and the code for the shader it is trying to compile is empty. Shaders are usually compiled to describe the node graph so that the image can be composited on your GPU.

Is it reasonable to assume you have no custom GLSL nodes in your install? Does this happen on startup, randomly, on every frame, etc?

One of our layout artist is getting this error message on each startup:

ERROR: 0:3: ‘#version’ : must occur first in shader
ERROR: 0:3: ‘#version’ : bad profile name; use es, core, or compatibility
ERROR: 0:3: ‘#version’ : bad tokens following profile – expected newline
ERROR: 0:3: ‘’ : missing #endif
ERROR: 0:3: ‘’ : compilation terminated
ERROR: 5 compilation errors. No code generated.
ERROR: 0:3: ‘#version’ : must occur first in shader
ERROR: 0:3: ‘#version’ : bad profile name; use es, core, or compatibility
ERROR: 0:3: ‘#version’ : bad tokens following profile – expected newline
ERROR: 0:3: ‘’ : missing #endif
ERROR: 0:3: ‘’ : compilation terminated
ERROR: 5 compilation errors. No code generated.

P

INFO: loaded ShotGrid config module ‘shotgrid_fields_config_standard’ (C:/Program Files/ShotGrid/RV-2022.3.1/plugins/Mu/shotgrid_fields_config_standard.mu)

INFO: C:/Users/redacted/Desktop/cinMSA_220BKB_E1_1_20230125.mov

INFO: sgtk_rv_bootstrap Looking for tk-core here: C:/Program Files/ShotGrid/RV-2022.3.1\src\python\sgtk\baked\plugin\bundle_cache\baked\tk-config-rv\v1.4.0\install\core\python
INFO: sgtk_rv_bootstrap:Looking for tk-core here: C:/Program Files/ShotGrid/RV-2022.3.1\src\python\sgtk\baked\plugin\bundle_cache\baked\tk-config-rv\v1.4.0\install\core\python
INFO: Toolkit initialization: ready to import sgtk at 0.00131941 sec.
INFO: Toolkit initialization: sgtk import complete at 0.627262 sec.
INFO: sgtk_rv_bootstrap:Will connect using
INFO: Toolkit initialization: ToolkitManager complete at 0.82245 sec.

INFO: Toolkit initialization took 1.4189 sec.

INFO: using shotgrid server ‘https://gearbox.shotgrid.autodesk.com

Ping. Any ideas or suggestions from Autodesk shotgrid RV support?

It seems like the external GPU: AMD Radeon RX 6900 XT, was causing the issue(very slow playback and error messages). When it was unplugged, RV worked correctly.

I am having the same issue here. Just switched to AMD RX6600 and its giving me this error. Help!

Same here. Is this solved?