I'm making a game in Android Studio with libgdx and box2d using a tutorial. I'm pretty sure I understand most of the code but lately the game runs slow and crashes. I think I may have introduced a memory leak somewhere but I'm having a hard time finding it. The game doesn't consistently crash at any point as far as I know, just sometimes, but the slowness happens every time throughout the game. I think they might be happening during collisions between box2d bodies but I'm not sure if that would explain the slowness as well.
How do I even begin to look for the problem? I tried undoing a recent change which helped with the slowness a bit but it’s still crashing. I would post the code but there are several entire Java files that could be involved. Can anyone point me in the right direction?
here are some of the things the logcat put out:
Fatal signal 11 (SIGSEGV) at 0x0001020f (code=1), thread 1829 (Thread-131031)
Should have subtitle controller already set
GL_INVALID_OPERATION
I don't know what else I should be looking for but there was a lot of stuff in logcat.