0

I have really simple code in Libgdx project, and it doesn't work on Android, but pretty works on Desktop. On Android I have this errors after a couple of render times:

E/OpenGLRenderer(1314): Getting MAX_TEXTURE_SIZE from GradienCache
E/OpenGLRenderer(1314): Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
W/GL2JNIView(1314): creating OpenGL ES 2.0 context
 E/EGL_genymotion(1314): [getAttribValue] Bad attribute idx
E/EGL_genymotion(1314): tid 1328: eglGetConfigAttrib(573): error 0x3004 (EGL_BAD_ATTRIBUTE)
A/libc(1314): Fatal signal 11 (SIGSEGV) at 0x971ae008 (code=2), thread 1328 (Thread-96)

Show Method:

    batch = new SpriteBatch();
    camera = new OrthographicCamera();
    FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("cutive.ttf"));
    FreeTypeFontParameter parameter = new FreeTypeFontParameter();
    parameter.size = 30;
    font = generator.generateFont(parameter);
    generator.dispose();

Resize Method:

    camera.viewportWidth = width;
    camera.viewportHeight = height;
    camera.update();

Render Method:

    Gdx.gl.glClearColor(0, 0, 0, 0);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    batch.setProjectionMatrix(camera.combined);
    batch.begin();
        font.draw(batch, "helloabssdadaa", 100, -300);
    batch.end();
  • Include more information about the crash, just that one line is not helpful. – nEx.Software Sep 22 '14 at 13:03
0

I founded solution. It was on the splash screen. Dont dispose anything in splash.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.