Same issue here. Im getting the same error if I enable Sphax Pack with the Patch.
Optifine 1.12.2 HD U G5.
I can disable Sphax and the Patch, and play with shaders just fine though.
onDemandAnimatedTextures to false in LoliASM.cfg as well, so now Im at a loss for what to do further