[LibGDX] Problematic frames
It happens because you try to dispose resources that had been disposed.
batch.dispose();
stage.dispose();
From source code of Stage class
public void dispose () {
if (ownsBatch) batch.dispose();
}
Exception from JVM will be given if your batch is reference of Stage's SpriteBatch. (The odd is high, we rarely create new SpriteBatch if we use Stage)
The solution? Call dispose() once on either the stage or spritebatch reference.
Written by Hendra Gunawan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Game development
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#