Segfaults and other unsafe memory access weird behaviour when passing uniforms to GLSL

Hi! I just ported one of my old ISF shaders to TD, and get this weird effects, quite often with segfaults.

This (presumably) was caused by passing CHOP value instead of reference to “Uniform arrays” in a component.
It also seems that something is very wrong with a shader itself, it takes very long time to compile and I couldn’t reproduce the problem on a blank shader.
So if you notice what I did wrong there, I’d be grateful for a lesson =)

Example project is in attach

MacOS 11.4 (20F71)
Radeon 5700XT in eGPU case (26.0 KB)

Hey @mcornholio

Apologies for the delay.

I gave a try to your file but not in an eGPU context. Can you confirm that you shared the same file you had issues with ?

There is only one uniform and it’s a Float parameter being passed instead of what should be a CHOP.

See screenshot, that’s what I have when opening your file.

If I assign a CHOP, and add the missing uniforms, the shader compiles as expected and there is no issue.


Actually, based on file name, it wasn’t the project that I created for this report, but instead it was one that I’ve been originally working with
So, I downloaded the project that I submitted, opened it (without eGPU this time), got around 20 seconds of freeze, then this:

Here’s the crash log, hope it will prove itself useful
TouchDesigner_2021-09-27-195016_cornholio-osx2.crash (119.2 KB)

@mcornholio Thanks for the share,

I’ve logged an issue and attached the file for a developer to look into it.

Note that a new stable version of TouchDesigner is available on Mac OS.


Thanks for the update! (pun intended ;))

Here’s the crash report from new version.
Please note that crashes aren’t necessary happen at the moment of opening the project, I had to do some random stuff to get it this time.
Everything looked like on examples before

TouchDesigner_2021-09-28-104435_cornholio-osx2.crash (131.1 KB)