GL_VERTEX_SHADER and GL_FRAGMENT_SHADER Errors on M1 / Big Sur

Hey, I’m trying to get Andrei Jay’s Video Waaaves working on an M1 Mac / Big Sur, but getting GL_VERTEX_SHADER and GL_FRAGMENT_SHADER errors in the console.

The same project builds without errors on my 16" MBP on Catalina.

I managed to build the apps on the M1 in Xcode 12.4 by swapping the libfmodex.dylib file and changing a few lines in Run Script, as described here:

The apps launch with their GUIs, but I just get a black video screen using both webcam and NDI. I’ve tried swapping libndi.4.dylib with the latest version from NDI video monitor, as this gets NDI working in OBS on M1, but it hasn’t made any difference here.

Here is a text dump from the console:

	1.	2021-04-24 00:13:08.398117+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=15228
	2.	 
	3.	2021-04-24 00:13:08.398861+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] SecTaskCopyDebugDescription: VIDEO_WAAAVES_2_[15228]/0#-1 LF=0
	4.	 
	5.	[ error ] ofAppGLFWWindow: 65544: Cocoa: Failed to find service port for display
	6.	 
	7.	2021-04-24 00:13:09.080491+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] Metal API Validation Enabled
	8.	 
	9.	2021-04-24 00:13:10.507994+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002451340> F8BB1C28-BAE8-11D6-9C31-00039315CD46
	10.	 
	11.	[notice ] ofxMidiIn: 0 ports available
	12.	 
	13.	  
	14.	MidiInCore::openPort: no MIDI input sources found!
	15.	 
	16.	  
	17.	[ error ] ofxMidiIn: couldn't get open port 1: MidiInCore::openPort: no MIDI input sources found!
	18.	 
	19.	Cannot run NDI.Cannot run NDI.[warning] no NDI Source found: 
	20.	 
	21.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_VERTEX_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_mixer.vert"
	22.	 
	23.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_FRAGMENT_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_mixer.frag"
	24.	 
	25.	[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet
	26.	 
	27.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_VERTEX_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_blur.vert"
	28.	 
	29.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_FRAGMENT_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_blur.frag"
	30.	 
	31.	[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet
	32.	 
	33.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_VERTEX_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_sharpen.vert"
	34.	 
	35.	[ error ] ofShader: setupShaderFromFile(): couldn't load GL_FRAGMENT_SHADER shader  from "/private/var/folders/40/wgr3vtyx6r1bd1_8fzrj7hgw0000gn/T/AppTranslocation/8F83D57B-FA59-448E-ADF3-5365A2A95B84/d/VIDEO_WAAAVES_2_5Debug.app/Contents/MacOS/../../../data/shadersGL2/shader_sharpen.frag"
	36.	 
	37.	[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet
	38.	 
	39.	2021-04-24 00:13:10.710553+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002447360> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A
	40.	 
	41.	2021-04-24 00:13:10.931873+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600002447360> 30010C1C-93BF-11D8-8B5B-000A95AF9C6A
	42.	 
	43.	[notice ] Device: 0: FaceTime HD Camera
	44.	 
	45.	2021-04-24 00:13:12.571460+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 2003332927, failed
	46.	 
	47.	2021-04-24 00:13:13.231885+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 2003332927, failed
	48.	 
	49.	2021-04-24 00:13:44.828770+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIO_DP_HardwarePlugInInterface.cpp:791:HardwarePlugIn_StreamCopyBufferQueue CMIO::DP::HardwarePlugIn_StreamCopyBufferQueue: no queue altered proc
	50.	 
	51.	2021-04-24 00:13:44.829369+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIO_DAL_PlugIn.cpp:270:StreamCopyBufferQueue Error: 1852797029, got an error from the plug-in routine
	52.	 
	53.	2021-04-24 00:13:44.829880+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:1265:CMIOStreamCopyBufferQueue Error: 1852797029, failed
	54.	 
	55.	2021-04-24 00:13:44.836843+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:323:CMIOObjectGetPropertyData the System is exiting
	56.	 
	57.	2021-04-24 00:13:44.836915+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 1970171760, failed
	58.	 
	59.	2021-04-24 00:13:44.836983+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:323:CMIOObjectGetPropertyData the System is exiting
	60.	 
	61.	2021-04-24 00:13:44.837013+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 1970171760, failed
	62.	 
	63.	2021-04-24 00:13:44.837151+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:323:CMIOObjectGetPropertyData the System is exiting
	64.	 
	65.	2021-04-24 00:13:44.837181+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 1970171760, failed
	66.	 
	67.	2021-04-24 00:13:44.837245+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:323:CMIOObjectGetPropertyData the System is exiting
	68.	 
	69.	2021-04-24 00:13:44.837274+0100 VIDEO_WAAAVES_2_5Debug[15228:328962] [] CMIOHardware.cpp:379:CMIOObjectGetPropertyData Error: 1970171760, failed

Does anyone have any ideas how to fix these shader errors?

Thanks!

Just a quick look on your issue. Lots of things going on here.
did you try to use latest release on M1? (0.11.2)
I think you don’t need to change scripts anymore.

Maybe something related to app translocation?

And for me NDI is not working yet on M1, just on Intel.

Hi, thanks for taking a look. There’s a lot going on there and I don’t know where to begin! You can ignore the midi and NDI errors in there though.

I haven’t tried the latest version yet, will give it a try. This is my first time using openFrameworks, so haven’t worked out how to update an existing project yet.

There is a fix here for getting NDI to work with OBS on M1, which is just swapping libndi.4.dylib with the latest version from NDI video monitor.

1 Like

Nice. maybe if you try to isolate the shader part only in a separate software you can identify if you found an issue related to shader + M1 / Big Sur.

Or at least help you identify the issue is somewhere else.

1 Like

Got both Video Waaaves and NDI working with the latest version 0.11.2, thanks!

I had to swap all the libndi.4.dylib files with the one included with NDI video monitor, and also swapped the libfmodex.dylib and edited the run script as mentioned in my first post.

1 Like