there was a function being called inside newShader that tried to read the shader files, but didnt allocate memory properly to read it.