Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Crash when setting a new screen

$
0
0

In my almost finished game I want to set a new screen on game over. I got my game over method:

    private void gameOver(Label score) {
    for (Body body : worldBodies) {
        world.destroyBody(body);
        dispose();
        ((Game) Gdx.app.getApplicationListener()).setScreen(new GameOver());
    }
}

Whenever the method gets called the screen freezes for a second and the game crashes with this statement:

09-02 22:04:34.036      391-425/com.joelbrun.jetskirider.android A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 425 (GLThread 29501)

Viewing all articles
Browse latest Browse all 434

Trending Articles