Godot 3.0 RC2 (tried on 32bit)
(same error in Godot 3.0 RC1)
Windows 10. NVIDIA GForce GT610 (Driver 390.65, newest), Intel i5
_bugsquad edit:_ also for AMD R7 from an AMD A8 7650K APU (from #21880)
Issue description:
When I switch the threading to "Multi-Threaded" the console constantly repeats this message while the project is run. (Even if I switch off the visibility for all items in the tree):
SCRIPT ERROR: (null): Expected 'shader_type' at the beginning of shader.
At: :1
ERROR: RasterizerStorageGLES3::_update_shader: Condition ' err != OK ' is true.
At: driversgles3rasterizer_storage_gles3.cpp:1697
0
(The output window just displays "0" repeatedly.)
The project doesn't use any user-defined shaders. Not even textures.
Maybe important to notice: This demo project was migrated (by 2.1.4) to Godot 3. Meshes (Testcube) have been replaced by Mesh/CubeMesh.
Steps to reproduce:
Download the little project and run it.
Minimal reproduction project:
3d_vectors_demo.zip
I can confirm this on Ubuntu 17.10 x64, Godot 3.0-rc2, independent sample project.
The error is displayed several times (50+ for me) when the project is first run but it doesn't appear to be looping; it quiets down eventually.
Same on macOS.
Still occurs on Godot 3.0 stable. The message repeats 54 times (while the Project pauses for a second or so then continues normally).
The scene uses 3 Meshes each with 1 SpatialMaterial (Albedo Color set) and 2xImmediateGeometry with 1 Material Override (SpatialMaterial).
The errors don't occur on ThreadModel "Single Threaded".
Same on linux.
This happens to me (Debian, 3.0.3-RC3) when Multi-Threaded is selected and I load any kind of material (from scene or manually). I guess there's some kind of problem generating shaders.
This error also occurs when taking the 2D multi-player demo and switching it to Multi-Threaded. No actual shaders in the project. On Linux Mint 18.3 Lenovo Intel HD Graphics.
This problem occurs in single-threaded mode. The problem manifests itself if we dynamically load a scene in which there are shaders. I will give an example.
There is a project with two scenes. At start the scene "one" is loaded. Then we load the scene "two". If there is at least one shader in scene "two", then we will get this error.
To solve this problem, you can add this shader to the scene "one".
I want to advise adding a label "3.1" for this error, because it often appears.
On older NVIDIA GPU's it's not happening
Same problem on both Intel HD520 (integrated) and Nvidia GTX 965M with Win10 64bit (latest update).
This happens only in Multithreaded mode.
Please take the time to fix it. I really need multithreading to work for my project and I'm sure I'm not the only one :S Thank you very much for all your work! <3
This happens on OSX 10.13.6 with Intel HD Graphics 615 1536 MB.
It doesn't appear to cause problems running my game or exporting it from the editor, but when I try to export my game via the command line (by running the Godot binary in Godot.app/Contents/MacOS/Godot), it hangs and never successfully exports my project.
Thread mode is single-safe.
I gave it a go a few days ago trying to solve the issue. What I've found out is that p_shader->code here https://github.com/godotengine/godot/blob/master/drivers/gles3/rasterizer_storage_gles3.cpp#L2003 is empty and that's why it's throwing that error. Adding a return before that if the p_shader->code is empty stopped the error from appearing but I don't think that's the correct fix.
I wasn't able to find the root of the issue so I'll leave that to someone else. Maybe @reduz or @karroffel know what's happening.
Cherry-picked for 3.0.7.
Most helpful comment
Cherry-picked for 3.0.7.