GL error 0x501 messages when using GPUImageLookupFilter

Author: seriousideaCreated Oct 7, 2021Updated Oct 8, 2025

When using GPUImageLookupFilter, error messages appear in the log (as you can see in the photo). The first error message looks like this:

E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glEnableVertexAttribArray:872 GL error 0x501 Info: Invalid vertex attribute index. Wanted index: 4294967295. Max index: 16

This error message occurs in the method onInit() of file GPUImageTwoInputFilter.java after calling method GLES20.glEnableVertexAttribArray() with parameter -1. Right after this call the GLES20.glGetError() method will return error 1281 "invalid value".

To reproduce: just launch the project GPUImage Sample on android emulator via Android Studio, select an image and apply GPUImageLookupFilter. Or create and use your own project with this filter.

GLError501

Source: wasabeef/android-gpuimage