If you copy the BasicGLSurfaceView sample code that comes with the Android development kit to start your project, then the first call to
checkGlError
is after attaching the vertex shader. However, you might have used an invalid value or enum a lot earlier or in a different location in your code. But this will only be picked up by this call, after glAttachShader.
In my case I deleted a texture which was still linked as render target for a framebuffer. My older Android device which runs slower compiled the shader before deleting, my newer device somehow managed to call
glFramebufferTexture2D
before compiling the shader. The whole thing somehow links to queueEvent and my poor understanding of thread-safety.
Thanks for your efforts, TraxNet and Prateek Nina.