# Weird error with opengl in Android using Libgdx : "EGL_BAD_ATTRIBUTE"

I am having a weird error when uploading my game in the phones.

I am using OpenGL 1.0.

It begans to upload the textures, but when it is about to finish uploading them, it finishes unexpectedly without any message in logcat.

Any ideas what is happening?

When I updated my xperia ray to ics it began having this problem

And when it loads, and I navigate through screens I get this in logcat

<qgl2DrvAPI_glClear:33>: GL_INVALID_VALUE

This is my line using the clear

• this.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

The type of gl is GL10

Here is my logcat output

According to the official OpenGL documentation,

glClear generates GL_INVALID_VALUE if any bit other than the four defined bits is set in mask.

So, i would double check your glClear sentence. Can you post a few of your code so we can check it?

EDIT: I believe you have more than one error in your code. First, looks like OpenGL ES is complaining about this glClear and it is causing a GL_INVALID_VALUE gl error. Then, regarding other error, having a look at the OpenGL ES documentation of eglGetConfigAttrib, you can see that

EGL_BAD_ATTRIBUTE is generated if attribute is not a valid frame buffer configuration attribute.

Can you post again the line where you use eglGetConfigAttrib? I would double check that attribute parameter and its value.

• I uploaded it :) although I think it is a problem with the update to ICS :/ I have to investigate with the bad logic games people :( Jul 31 '12 at 23:45
• I doo´t use the eglGetConfigAttrib :/ I think that the libgdx libraries do that Aug 1 '12 at 0:10