nallath / ModelCutter

A model cutter plugin for Cura
GNU Affero General Public License v3.0
4 stars 0 forks source link

Shader in view can sometimes not be created #2

Closed nallath closed 2 years ago

nallath commented 2 years ago

For some reason, the shader can't be created on OSX. User provided the following logs from Cura.

2021-08-24 11:21:08,222 - DEBUG - [MainThread] UM.Controller.setActiveView [108]: Setting active view to ModelCutter
2021-08-24 11:21:08,261 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,266 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:8: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,269 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,273 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:1: '' :  #version required and missing.
ERROR: 0:9: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,276 - ERROR - [MainThread] UM.Logger.logException [112]: Exception: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,280 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,283 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 197, in createShaderProgram
2021-08-24 11:21:08,285 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,289 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,292 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,295 - ERROR - [MainThread] UM.Logger.logException [116]: During handling of the above exception, another exception occurred:
2021-08-24 11:21:08,298 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,301 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,304 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 203, in createShaderProgram
2021-08-24 11:21:08,306 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,309 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,398 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-08-24 11:21:08,402 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: Traceback (most recent call last):
2021-08-24 11:21:08,405 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/Qt/Bindings/MainWindow.py", line 254, in _render
2021-08-24 11:21:08,408 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/STRIPPED/Library/Application Support/cura/4.11/plugins/ModelCutter/ModelCutter/ChopperView.py", line 29, in beginRendering
2021-08-24 11:21:08,411 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:     self._active_node_shader.setUniformValue("u_ambientColor", Color(0.3, 0.3, 0.3, 1.0))
2021-08-24 11:21:08,413 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'setUniformValue'
2021-08-24 11:21:08,564 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,569 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:8: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,573 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,579 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:1: '' :  #version required and missing.
ERROR: 0:9: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,581 - ERROR - [MainThread] UM.Logger.logException [112]: Exception: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,584 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,586 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 197, in createShaderProgram
2021-08-24 11:21:08,589 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,592 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,595 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,598 - ERROR - [MainThread] UM.Logger.logException [116]: During handling of the above exception, another exception occurred:
2021-08-24 11:21:08,601 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,604 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,607 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 203, in createShaderProgram
2021-08-24 11:21:08,610 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,613 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,616 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-08-24 11:21:08,619 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: Traceback (most recent call last):
2021-08-24 11:21:08,621 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/Qt/Bindings/MainWindow.py", line 254, in _render
2021-08-24 11:21:08,624 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/STRIPPED/Library/Application Support/cura/4.11/plugins/ModelCutter/ModelCutter/ChopperView.py", line 29, in beginRendering
2021-08-24 11:21:08,627 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:     self._active_node_shader.setUniformValue("u_ambientColor", Color(0.3, 0.3, 0.3, 1.0))
2021-08-24 11:21:08,630 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'setUniformValue'
2021-08-24 11:21:08,766 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,772 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:8: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,778 - DEBUG - [MainThread] UM.View.GL.ShaderProgram.load [60]: Loading [/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader]...
2021-08-24 11:21:08,783 - ERROR - [MainThread] UM.View.GL.ShaderProgram.setVertexShader [133]: Vertex shader failed to compile: ERROR: 0:1: '' :  #version required and missing.
ERROR: 0:9: 'attribute' : syntax error: syntax error

2021-08-24 11:21:08,786 - ERROR - [MainThread] UM.Logger.logException [112]: Exception: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,789 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,793 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 197, in createShaderProgram
2021-08-24 11:21:08,795 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,798 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,801 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,803 - ERROR - [MainThread] UM.Logger.logException [116]: During handling of the above exception, another exception occurred:
2021-08-24 11:21:08,806 - ERROR - [MainThread] UM.Logger.logException [116]: 
2021-08-24 11:21:08,810 - ERROR - [MainThread] UM.Logger.logException [116]: Traceback (most recent call last):
2021-08-24 11:21:08,813 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/OpenGL.py", line 203, in createShaderProgram
2021-08-24 11:21:08,815 - ERROR - [MainThread] UM.Logger.logException [116]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/View/GL/ShaderProgram.py", line 97, in load
2021-08-24 11:21:08,818 - ERROR - [MainThread] UM.Logger.logException [116]: UM.View.GL.ShaderProgram.InvalidShaderProgramError: Could not set vertex shader from '/Applications/Ultimaker Cura 4.11 beta.app/Contents/MacOS/resources/shaders/object.shader'.
2021-08-24 11:21:08,821 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [66]: An uncaught error has occurred!
2021-08-24 11:21:08,823 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: Traceback (most recent call last):
2021-08-24 11:21:08,827 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/ultimaker/build/Cura/4.11/build/inst/lib/python3.8/site-packages/UM/Qt/Bindings/MainWindow.py", line 254, in _render
2021-08-24 11:21:08,830 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:   File "/Users/STRIPPED/Library/Application Support/cura/4.11/plugins/ModelCutter/ModelCutter/ChopperView.py", line 29, in beginRendering
2021-08-24 11:21:08,832 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]:     self._active_node_shader.setUniformValue("u_ambientColor", Color(0.3, 0.3, 0.3, 1.0))
2021-08-24 11:21:08,835 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [69]: AttributeError: 'NoneType' object has no attribute 'setUniformValue'