I have developed an Android game which is played by many people. One user out of 100-200 faces an Exception that I cannot make any sense of.
I use a RenderTexture which throws the following Exception when I try to initialize it:
Fatal Exception: org.andengine.opengl.exception.RenderTextureInitializationException
org.andengine.opengl.exception.GLFrameBufferException: GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
It works on 99% of all devices. The init-method looks like this:
public void init(final GLState pGLState) throws GLFrameBufferException, GLException {
this.savePreviousFramebufferObjectID(pGLState);
try {
this.loadToHardware(pGLState);
} catch (final IOException e) {
/* Can not happen. */
}
/* The texture to render to must not be bound. */
pGLState.bindTexture(0);
/* Generate FBO. */
this.mFramebufferObjectID = pGLState.generateFramebuffer();
pGLState.bindFramebuffer(this.mFramebufferObjectID);
/* Attach texture to FBO. */
GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, GLES20.GL_COLOR_ATTACHMENT0, GLES20.GL_TEXTURE_2D, this.mHardwareTextureID, 0);
try {
pGLState.checkFramebufferStatus();
} catch (final GLException e) {
this.destroy(pGLState);
throw new RenderTextureInitializationException(e);
} finally {
this.restorePreviousFramebufferObjectID(pGLState);
}
this.mInitialized = true;
}
It seems like something is wrong with the FrameBuffer-Status...
Update
A list of phones where the crash happened so far:
Sony - Sony Tablet S
TCT - ALCATEL ONE TOUCH 5020A
TCT - ALCATEL ONE TOUCH 6030N
VNPT Technology - VNPT Technology Smart Box
Q-Smart - S32
LGE - LG-E465g
LGE - LG-D682TR
LGE - LG-E451g
LGE - LG-D686
LGE - LG-E470f
HUAWEI - MediaPad 7 Youth
unknown - Bliss Pad B9712KB
samsung - GT-P5110
samsung - GT-I9505
samsung - Galaxy Nexus
samsung - GT-P3110
samsung - GT-P5100
samsung - GT-P3100
samsung - GT-I9105P
samsung - GT-I9082
samsung - GT-I9082L
samsung - GT-I9152
samsung - GT-P3113
E1A - E1A
LNV - LN1107
motorola - XT920
motorola - XT915
asus - ME172V